Use DAX to Show Values in any Way You Like! Dynamic Format Strings in Power BI

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 ก.ย. 2024

ความคิดเห็น • 115

  • @alicedwonderland7733
    @alicedwonderland7733 ปีที่แล้ว +1

    Bas, fantastic video as always! Note to my fellow watchers: remember to first go to the report Options and enable this preview feature.
    As for a use case, how about when you have a beautiful switch between Amounts and Quantity? This is what I'm using it for. Amounts must be in thousands, and Quantity in, well, regular formatting. And for thousands, I used "#,##0,.k", to see the 'k' at the end.
    Update: fudge, the formatting is a mess when we use it in a visual (the thousands one) and apply data labels! It's all over the place!

  • @PeterFabian-gu1lp
    @PeterFabian-gu1lp 6 หลายเดือนก่อน

    Thank you mate, I've struggled with formatting for half a day, you saved my @$$ and won a new follower! ;)

  • @LeighRadmore
    @LeighRadmore ปีที่แล้ว +1

    Thanks for this - we had a user requirement to show a measure value in K or M based on the the length or value itself and I just made a way to do this automatically with dynamic formatting - wouldn't have known about it if not for this video.

    • @paulgallagher2987
      @paulgallagher2987 ปีที่แล้ว

      I was thinking about this too. Did you do something along the lines of "IF [Sales] > 800,000 then M formatting else K formatting"

    • @LeighRadmore
      @LeighRadmore ปีที่แล้ว +1

      @@paulgallagher2987 yea basically, I used switch as there were multiple 'buckets'

    • @sholder9933
      @sholder9933 ปีที่แล้ว +1

      Marco Russo just published a video on how to do this.

  • @Cleanfreak005
    @Cleanfreak005 ปีที่แล้ว +1

    Hi Bas, super helpful and very well explained video. May you please add a video, with option allowing only currency symbol to be in bold and the figures as normal. Thank you

  • @digitsletters972
    @digitsletters972 ปีที่แล้ว +1

    Thank you! Regarding dynamic formatting - will try it in matrices, I often use dynamic columns with some additional calculations following a set of periods (e.g. % variance of last period vs the previous)

    • @HowtoPowerBI
      @HowtoPowerBI  ปีที่แล้ว

      not sure if i get the use case .. could explain more?

    • @digitsletters972
      @digitsletters972 ปีที่แล้ว

      I have a matrix with values containing sales by period (need number formatting), rows containing customers, columns containing not only periods but some additional calculations which demand different formatting: variance vs previous period(%), absolute variance (+-), weight of sales by customer in total sales (%), etc.
      I solved it by using a combination of SWITCH/SELECTEDVALUE/FORMAT() directly in a measure, but it has some inconveniences for users (while exporting to excel the columns with formatting are stored as text) and for me (additionally complicates my multi-row measure🙂).
      Hope I will be able to put that SELECTEDVALUE/FORMAT part into the dynamic format

  • @Mircor55
    @Mircor55 ปีที่แล้ว

    Amazing video! Your workaround for measure driven labels solved my problem!

  • @datactive859
    @datactive859 ปีที่แล้ว

    when I was noticed with april update earlier this month, I knew Bas is going to give this lecture. Thanks bro, your version is the best

    • @HowtoPowerBI
      @HowtoPowerBI  ปีที่แล้ว

      thank! lol -> what's gonna be my next vid?! ;)

  • @nishantkumar9570
    @nishantkumar9570 ปีที่แล้ว +2

    Awesome! Thank You so much!
    A request:
    Could you please share lights on
    % YOY, % MOM, %WOW, WTD using new window ,offset functions.
    Thank you again.

    • @HowtoPowerBI
      @HowtoPowerBI  ปีที่แล้ว +1

      thanks! here you go :) th-cam.com/video/eib5X5xRlz8/w-d-xo.html

    • @nishantkumar9570
      @nishantkumar9570 ปีที่แล้ว

      @@HowtoPowerBI I rarely miss any of your videos, I already watched it and it helped me a lot in understanding those new function and it's implementation. Still I'm little bit confused on Month over month change and Week over week change.

  • @patitosamsungtelita
    @patitosamsungtelita ปีที่แล้ว

    Hola Bas,
    Eres un crack.
    Mil gracias por compartir tu sabiduría.
    Abrazo fuerte

  • @paulgallagher2987
    @paulgallagher2987 ปีที่แล้ว +1

    Great video as always Bas! Thanks a lot. And just when I'm about to need to do multi currency reporting.
    Please could you share the DAX for your MaxMin Measure. I don't understand how it outputs 2 different values. Is it a TRUE/FALSE output? eg
    MinMax =
    IF(OR( [Sales] = Maxvalue, [Sales] = MinValue), 1,0)

  • @giorgiopresicce8192
    @giorgiopresicce8192 ปีที่แล้ว

    I found it incredibly useful, as always! Thanks for consistently updating all of us with the latest and most innovative content! I truly appreciate it!

  • @anneetaylor464
    @anneetaylor464 6 หลายเดือนก่อน

    Thanks, especially for sharing the dimCurrency Table :)

  • @walteradamsbe
    @walteradamsbe ปีที่แล้ว

    Hi Bas, great tutorial (like always).
    I have a use case to have different formatting for every row from where I work: we have a sales table visual which shows a number of rows of sales actuals (in EUR) with right below it (in the same table) the number of units sold (of course in absolute values).
    It's not my preferred visual to do this because I find it confusing but management is used to this table so there you go 🙂

  • @vishalnasre1251
    @vishalnasre1251 ปีที่แล้ว

    This is really out of the Box
    Thanks Bas for great video.

  • @ruioliveira4149
    @ruioliveira4149 9 หลายเดือนก่อน

    Thank you very much for these video. Was exactly what I was searching for. You are great!!

  • @unnikrishnansanthosh
    @unnikrishnansanthosh ปีที่แล้ว

    if its BAS then something out of the box, great thanks for sharing

  • @markhenderson3771
    @markhenderson3771 ปีที่แล้ว +1

    Thanks for the content. Is there a way to add color to dynamic formatting? For example, I am in a table column and I want to use a UNICHAR arrow and make the up arrow (9650) green and the down arrow (9660) red, all within the dynamic formatting.

  • @alicedwonderland7733
    @alicedwonderland7733 ปีที่แล้ว

    Thank you, Bas! You make my work shine!

    • @HowtoPowerBI
      @HowtoPowerBI  ปีที่แล้ว +1

      Glad to hear this thx for the support!

  • @kathimmaculata
    @kathimmaculata ปีที่แล้ว +1

    Hi Bas, in my case the values has to be in $ and % . Is that possible?

  • @kshitijwadhwani5077
    @kshitijwadhwani5077 ปีที่แล้ว

    Thanks a lot super simple and understandable explanation , I did watch few videos but none comes across the way you explain and make it simple to understand. I had a request can you make a video to explain how we do all the advance filtering in a filter pane , doing those same things in slicer ?

    • @HowtoPowerBI
      @HowtoPowerBI  ปีที่แล้ว

      thanks a lot! :) .. depends a bit what type of filter you are looking for .. not all of them are possible with a slicer in a similar way

  • @No_Saints_
    @No_Saints_ ปีที่แล้ว

    Thanks for the video. I do have a request where the format string would be based on the count of digits in a number would be a specific format (IE. If the value is less than 1M show $#0.0K, if the value is less than 1K show $#0, etc.)

  • @Jworth-kc4qc
    @Jworth-kc4qc ปีที่แล้ว

    Hey Bas! You are a life saver man. One question, will this work for KPI Card displaying either decimal, percentage, or whole number for value and target? Thanks and keep it up!

  • @harrietdrums
    @harrietdrums ปีที่แล้ว +1

    I didn't know that you had to go into options and enable preview features in order to do this, and was wondering/googling for ages as to why I didn't have dynamic as a formatting option despite being on the most recent verion of PowerBI. Please can you specify this for beginners like me 😭

  • @macilakertous8041
    @macilakertous8041 ปีที่แล้ว

    Hi Bas, great video as always.
    can you show me what the minmax measure looks like please!?

  • @davemurdoch5687
    @davemurdoch5687 ปีที่แล้ว

    Hi Bas, great channel. Great videos. As a suggestion : I would love to see your version of reconciliation. In quantity and financial value maybe even with currencies. Accounts Receivables also very interesting. Thanks for the inspiration.

  • @edwinarchico439
    @edwinarchico439 ปีที่แล้ว +1

    As always, excellent Bas, thank you!

    • @HowtoPowerBI
      @HowtoPowerBI  ปีที่แล้ว

      thank you very much for watching again !! :D

  • @K-mk6pc
    @K-mk6pc ปีที่แล้ว

    I found it increadibly useful.

  • @user-po2ze4mj4m
    @user-po2ze4mj4m ปีที่แล้ว

    Very helpful as always you do. Thank you Bas.
    Is it possible to display different currency values with Thousands, Millions, Billions.

  • @arbazahmad7177
    @arbazahmad7177 ปีที่แล้ว

    Great explanation.. But how to up or down arrow in data label

  • @theminimalistings
    @theminimalistings ปีที่แล้ว

    Awesome! Thank you Bas! 🙌 Btw, do you mind sharing the the [MaxMin] dax? 😅

  • @sebaphilip
    @sebaphilip ปีที่แล้ว

    this is amazing!!! is that currency table available somewhere? Thks

    • @HowtoPowerBI
      @HowtoPowerBI  ปีที่แล้ว

      There is a download link in the description

  • @tofonofo4606
    @tofonofo4606 ปีที่แล้ว

    Great Stuff Bas!
    My first thought was to use a Len() function of some sort to determine the value length and then dynamically adjust the value display across a single table without the slider needed. You could put all the same currency logic also. Helpful if you have values in millions and thousands in the same column.
    Cheers!

    • @HowtoPowerBI
      @HowtoPowerBI  ปีที่แล้ว

      thanks a lot :) yea, definitely also possible, just depends on whether you want that slicer. And also if you have many options (for example many currencies) probably the table is a bit easier.

  • @arbazahmad7177
    @arbazahmad7177 ปีที่แล้ว

    Really Amazing...Thanks for this..

  • @luisfernandomacedo1451
    @luisfernandomacedo1451 ปีที่แล้ว

    Great Bass!

  • @vesnastojanova
    @vesnastojanova ปีที่แล้ว

    Thank you. Realy good case.

  • @nemnoch
    @nemnoch 9 หลายเดือนก่อน

    Curious if you can use they for dates formats as well. Been struggling to figure it out on my own.

  • @brunavogt278
    @brunavogt278 ปีที่แล้ว

    Hello Bas, awesome video as always... one doubt, do you know how I could format a specific column of a matrix so only the values of that column are with a bold font?

  • @JurgensvanEeden
    @JurgensvanEeden ปีที่แล้ว

    Awesome video excited to try it out. Do you know if this will work for a visual that uses a field parameters those different values. At the moment i end up when some of the measures returns small amounts it wout show 0,0k.

  • @In_a_state
    @In_a_state ปีที่แล้ว

    Using the formatting option to show complex labels instead of having to use calculation groups (which could be often problematic depending on where else you used the same measure or the axis) is the bigger update for me.

    • @HowtoPowerBI
      @HowtoPowerBI  ปีที่แล้ว +1

      Its still a bit of cluncky work around. :) an fx button to set label values would b nice

  • @marc-andreperreault1353
    @marc-andreperreault1353 ปีที่แล้ว

    Hi Bas,
    Great content as usual!
    I have a use case, where I present a line chart and I'm switching between different measure (sales, units, baskets, etc.).
    The dynamic option for my calculations works fine, but the Y axis labels is not always following. Is there a way to make sure the Y axis also displayed the good units ?
    Thank you!

  • @juanignacioXI
    @juanignacioXI ปีที่แล้ว

    Hello Bas, can u give me a TIP in how you build the MAXMIN measure? I suppose u used variables like this:
    Var MaxValue = MAX('YourTableName'[YourValueColumnName])
    Var MinValue = MIN('YourTableName'[YourValueColumnName])
    Return
    IF( "Measure" = MAXVALUE, MAXVLUE, IF( "Measure" = MINVALUE, MINVALUE, BLANK()))
    Can u please correct me if im wrong, thanks in advance.

  • @garudabowo
    @garudabowo 2 หลายเดือนก่อน

    can someone explain about the four quotation marks functioned?

  • @nidhi5823
    @nidhi5823 7 หลายเดือนก่อน

    What if on last tread graph , I want to show negative number in red font and in brackets.. only negative numbers.. how to achieve that

  • @joeyjojojrshabadoo
    @joeyjojojrshabadoo ปีที่แล้ว

    how about using Dynamic formating Strings (i didn't check if this was already suggested sorry) to "suppress" small number count. e.g. if the resulting value is greater then zero but less then 15 display a "suppressed" else value ....
    great content btw bud!! keep it up

    • @HowtoPowerBI
      @HowtoPowerBI  ปีที่แล้ว

      thanks for watching! :) i was thinking about scenarios like that as well, but I probably would then just filter those small values out instead of showing a different format .. or ?

    • @joeyjojojrshabadoo
      @joeyjojojrshabadoo ปีที่แล้ว

      @@HowtoPowerBI you could do that but you would be losing information in say, data tables when displayed, its suppressed data not null or lack of data, no? thoughts?

  • @johnkennethonet-makaticand2590
    @johnkennethonet-makaticand2590 ปีที่แล้ว

    😆 "Filipino currency symbol" - Lol. Philippine Peso. Very useful, Bas.

  • @perfectionist6624
    @perfectionist6624 ปีที่แล้ว

    as a powerbi developer do we need to learn Power apps & power Automate ? how Power apps & power Automate will benefit for PBI developer.

  • @luispecem
    @luispecem ปีที่แล้ว

    Need help! Matrix visuals are very very slow. I've put the dynamic format for 10 measures.

  • @royhj8966
    @royhj8966 9 หลายเดือนก่อน

    Brilliant!

  • @TheEdgarGL
    @TheEdgarGL ปีที่แล้ว

    In the April version of the P-BI, I don't find the option to "Add more analysis to your look". On the MS blog I didn't find any technical note that talks about it.
    Do you know if it's available elsewhere or if it's a bug in this version?

  • @obagoriolastephen300
    @obagoriolastephen300 ปีที่แล้ว

    What do you do when you have values with Km , L and mpg units in the same column. Sample....

  • @theA12d1
    @theA12d1 ปีที่แล้ว

    thanks!!

  • @bobert13581
    @bobert13581 ปีที่แล้ว +1

    It's a bad practice to do a cross filter=both just so the slicers get filtered. Just apply an 'is not empty' filter on a measure to the slicer visual instead. Microsoft says this in their bidirectional relationships guidance page and it's super easy and quick to do.

    • @RichardOliver
      @RichardOliver ปีที่แล้ว +1

      I use one I saw Alberto Ferrari do so, in all my models, there is a measure called 'The Alberto' that I use for this purpose.

    • @HowtoPowerBI
      @HowtoPowerBI  ปีที่แล้ว

      yea that would be better :) thx for pointing it out

  • @John-cq6vh
    @John-cq6vh ปีที่แล้ว

    Can I sort the dynamic format asc or desc? What's best way to do this? thanks

  • @ngoduyvu
    @ngoduyvu ปีที่แล้ว

    Amazing video as usual

  • @ajaaskelainen
    @ajaaskelainen ปีที่แล้ว

    Right on top! Great stuff

  • @konradjonsson1
    @konradjonsson1 ปีที่แล้ว

    Hi Bas. As always, great videos! I have a requirement where the report should show a)the total sales for each country, and b)the total sales for the region. A region is a group of countries. Each region has its own reporting currency defined, e.g. Europe = EUR, Americas = USD, etc. Finally, the Group total is the sum of all regions, displayed in one Group-currency.
    Your video explains a way to show each country’s currency code - do you also have a solution for how to show Region subtotals and Group totals?

    • @HowtoPowerBI
      @HowtoPowerBI  ปีที่แล้ว +4

      you would need to adapt/extend the logic of the dax expression for the formatting string .. check if not isfiltered(dimRegion[region]) then the group currency otherwise check which reigon is selected -> selectedvalue([dimRegion[region])="EMEA" then euro

  • @vishalnasre1251
    @vishalnasre1251 ปีที่แล้ว

    Hi Bas,
    One question,
    Is it recommended to use these preview feature for our production report ?
    if yess, could there be potential damage to report in case Power BI removes that feature ?

  • @JohnOttoKnoke
    @JohnOttoKnoke ปีที่แล้ว

    Great video as always, thanks. I'm working on a similar report that has several currency formats. Can share with us the URL where you got the different currency formats, please? Much appreciated

    • @HowtoPowerBI
      @HowtoPowerBI  ปีที่แล้ว +1

      thank you! I've put the excel file in the download for this video :)

    • @nishanth4323
      @nishanth4323 ปีที่แล้ว

      @@HowtoPowerBI 👍👏

  • @theshakoone
    @theshakoone ปีที่แล้ว +1

    Bas, what if I don't want to format into strings but keep the values. However, I need to show either a decimal, currency, int, or percent based on user selection on a matrix. Is that possible with dynamic?

    • @HowtoPowerBI
      @HowtoPowerBI  ปีที่แล้ว

      sure :) its like the unit example -> build a table that contains decimal, currency, int, pct in a column. use that for a slicer. Use dynamic format to see which one is selected and return the values with the format you like.

    • @theshakoone
      @theshakoone ปีที่แล้ว

      @@HowtoPowerBI thank you. I currently have the data type in the dim and am trying to change the data type on the line chart that is displayed. I will keep trying workarounds.

  • @thuytamdang3390
    @thuytamdang3390 ปีที่แล้ว

    Million thanks!

    • @HowtoPowerBI
      @HowtoPowerBI  ปีที่แล้ว

      thank you for watching! :)

  • @Barrett-WB
    @Barrett-WB 10 หลายเดือนก่อน +1

    Did PowerBI remove this option? I have the latest version and don't see Dynamic as an option in the format dropdown

    • @HowtoPowerBI
      @HowtoPowerBI  10 หลายเดือนก่อน +1

      go to options, preview features, turn on dynamic format strings for measures

    • @Barrett-WB
      @Barrett-WB 10 หลายเดือนก่อน

      @@HowtoPowerBI Thanks!

  • @Thalapraga
    @Thalapraga ปีที่แล้ว

    Hi, please let me know how to add the slider values in the table like in this video

  • @TamNguyen-cy3ix
    @TamNguyen-cy3ix ปีที่แล้ว

    Hi. Thanks for this! How to show it as 100M? e.g. 900,000,000 will give me 9 instead of 0.9B or 900M.

    • @HowtoPowerBI
      @HowtoPowerBI  ปีที่แล้ว

      th-cam.com/video/FVjtWouD5Fw/w-d-xo.html

  • @momopeaches
    @momopeaches ปีที่แล้ว

    Is there a way I can format percentages without %? For example, if the result is 51.3%, I want to show only 51.3, not 0.513.

  • @kenekholm8325
    @kenekholm8325 ปีที่แล้ว

    Can we do calculations in the dynamic format string, like lookup exchange rate and then format?

  • @narendrababu2287
    @narendrababu2287 ปีที่แล้ว +1

    😍

  • @pakarussiapinto6718
    @pakarussiapinto6718 ปีที่แล้ว

    Awesome thank you

  • @menkar91
    @menkar91 ปีที่แล้ว

    Colombia 💪

  • @crizzy4u764
    @crizzy4u764 ปีที่แล้ว

    Thanks Bas 😍

  • @zxccxz164
    @zxccxz164 7 หลายเดือนก่อน

    but how do you do this if you use SSAS?

  • @TheInfernalwing
    @TheInfernalwing 6 หลายเดือนก่อน

    how to work on between numbers and %?

  • @henryconmorales7348
    @henryconmorales7348 ปีที่แล้ว

    del lujo....

  • @vishwassharma3312
    @vishwassharma3312 ปีที่แล้ว +1

    👍👍❤️❤️

  • @vishwassharma3312
    @vishwassharma3312 ปีที่แล้ว +1

    Kindly provide the video of Google Data Studio.

  • @raeesg
    @raeesg ปีที่แล้ว

    Nice 👍

  • @scandinavia_adventure
    @scandinavia_adventure ปีที่แล้ว

    ❤️

  • @imperia81
    @imperia81 ปีที่แล้ว

    норм но плохо что нет на русском языке))) все красиво но ничего не понятно))))