当前位置:网站首页>158_ Model_ Power Bi uses DAX + SVG to open up almost all possibilities for making business charts

158_ Model_ Power Bi uses DAX + SVG to open up almost all possibilities for making business charts

2022-06-25 17:59:00 Jiaopengzi

158_ Model _Power BI Use DAX + SVG Get through almost all the possibilities of making business charts

One 、 background

Recently on Power BI Use in SVG More interested , Today we use DAX + SVG Copy it Zebra-BI Vision .

design sketch

158-1

Power BI public web effect :https://demo.jiaopengzi.com/pbi/158-full.html

In fact, many friends have seen this chart , Namely Zebra BI The effect of visual objects ; about Zebra BI Not the focus of this article , If you are interested, you can go to Zebra BI Official website (www.zebrabi.com) have a look . As a whole Zebra BI The chart is consistent with IBCS (www.ibcs.com) Standard for business charts .

Such a chart meets a requirement , That is to say IBCS Proposed " The theory of success " => "SUCCESS"

SUCCESS The theory is to spell the first letters of seven words , That is, the meaning of the hidden poem , as follows :

  • SAY : Accurate communication of information .
  • UNIFY : Unified universal symbolic language , Use symbols correctly .
  • CONDENSE : Increase information density , You'd better finish it on one page . This is in line with the habits of Chinese people , The Chinese style report can meet .
  • CHECK : Ensure visual integrity .
  • EXPRESS : Choose the appropriate visualization , Don't fuss .
  • SIMPLIFY : The greatest truths are the simplest , Avoid complications .
  • STRUCTURE : Structure is consistent with the organization .

The above is my understanding , In business charts , The above rules are really practical , We can also take its essence to its dross way to understand .

Two 、 Chart analysis

stay IBCS Under the standard of business chart , Let's analyze several elements of the above chart , Try to follow this standard in daily business statements .

  • PY:previous year Abbreviation , Indicates the previous year . Represented by a gray rectangle .

  • AC:actual Abbreviation , Indicates the current actual . Use a black rectangle to represent .

  • PL:plan Abbreviation , Indicates a goal or budget , It can also be abbreviated :BU (budget). Represent with a hollow rectangle .

  • FC:forecast Abbreviation , It means prediction , Forecasts are used in many business scenarios . Denote with a slash rectangle .

  • ΔPY:AC - PY, Actual and previous year PY The difference value of .

  • ΔPL:AC - PL , Reality and goals PL The difference value of .

  • ΔFC:AC - FC, Actual and forecast FC The difference value of .

  • ΔPY%:(AC - PY)/PY*100% , Actual and previous year PY Percent difference between .

  • ΔPL%:(AC - PL)/PL*100% , Reality and goals PL Percent difference between .

  • ΔFC%:(AC - FC)/FC*100% , Reality and goals PL Percent difference between .

  • Emotional color : Red means bad , Green means better .

  • Percentage extremum : The red triangle represents the smallest in the sequence , The largest in the green triangle sequence .

3、 ... and 、 The necessity of report making Power BI Elements

Ⅰ、 Date sheet , Please use the date table we made , See the attachment for details .

158-2

Ⅱ、Power BI Visual objects HTML Content It can be downloaded from the visual store .

158-3

Ⅲ、 Get ready SVG0_AC、SVG1_PY、SVG2_PL、SVG3_FC Of the four measures , Do not change the name of the measure , because SVG Primary measure SVG4_html and SVG5_image All depend on .

158-4

Four 、SVG Master measure configuration

SVG Primary measure SVG4_html and SVG5_image We have made the template , Just follow the above date table and SVG0_AC、SVG1_PY、SVG2_PL、SVG3_FC The four basic measures can be set according to your actual business .

SVG4_html : stay html Visual objects HTML Content Use in , Can realize the big picture .

SVG5_image : stay Power BI Used in native visual objects , Images can only be thumbnails .

In addition to SVG The corresponding configuration is made in the main measurement value , To meet the needs of individuation .

158-5

5、 ... and 、 Report generation

The above configuration is ready , Just pull the primary measure to the visual object , At the same time, it can change dynamically when used with slicer .

Pay attention to the use of HTML Content Visual objects , The measure used is SVG4_html .

158-6

stay Power BI In the native visual object matrix , Use measures SVG5_image . because Power BI Native visual objects limit the size of the image , So I can only see the thumbnails .

Of course, it is enough for some auxiliary minigraphs and auxiliary signs .

158-7

6、 ... and 、 summary

1、 Although this article is about SVG Repeated engraving , But I didn't go into details SVG The content of ; It is suggested to make up lessons by yourself :https://www.w3.org/Graphics/SVG/IG/resources/svgprimer.html

2、 stay Power BI Native objects , Yes SVG Some elements of the are still limited , For example, you can't use use , There are still some pits for everyone to try .

3、 At present, I am in Power BI Use more complex SVG It is recommended to use HTML Content , Other visual objects always have some SVG Element of does not support , If you have better suggestions, please leave a message .

4、 I have said that before , at present Power BI Native visual objects can't realize large pictures , Still recommended HTML Content , What we need to remind you here is , General enterprise users disable the third-party vision , It is recommended to contact your own administrator HTML Content Visual objects are added to their own organizational visual objects .

5、DAX + SVG The generated report interaction is relatively poor , There is a loss, there is a gain , The loss is worth it , Of course, if in html Add some JS It can also be realized , But the time cost is too high , Friends who have done research in this field are welcome to communicate .

6、 Through the above DAX + SVG + HTML Content Visual objects open up almost all the possibilities of making flat business charts .

Download the attachment

https://jiaopengzi.com/2796.html

by Jiaopengzi

原网站

版权声明
本文为[Jiaopengzi]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/176/202206251746332601.html