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

Ғылым және технология

In this video I show you how to control number formats with DAX! A better way to Display Values with Dynamic Formats in Power BI.
Enjoy this video and subscribe to always stay updated on my favorite Power BI tricks :)
Download file here datatraining.io/powerbi-how-to
--------------------------------
📊 TRAININGS 📊
---------------------------------
Power BI Design 4 Weeks Transformation Program my.datatraining.io/pages/powe...
Power BI Essentials datatraining.io/powerbilearni...
Business User Training datatraining.io/powerbi-busin...
For Custom Trainings and Consulting email directly support@datatraining.io
---------------------------------
⏱️ TIMESTAMPS ⏱️
---------------------------------
00:00 Intro
01:03 One measure - multiple currency formats
09:42 Switch between different units
13:15 Measure-driven labels
19:38 End
---------------------------------
😍 JOIN 😍
----------------------------------
Join bit.ly/4b453bi
Subscribe bit.ly/31MnQGO​
Insta / howtopowerbi
LinkedIn / basdohmen
TikTok / how.to.power.bi
X / howtopowerbi
fb / howtopowerbi
Threads www.threads.net/@howtopowerbi
Newsletter datatraining.io/newsletter
---------------------------------
👇 CHECK THIS OUT! 👇
---------------------------------
💻 My gear amzn.to/47F21Yc
📚 Power BI books MUST READ! amzn.to/3tUfFcj
💡 General books I recommend amzn.to/48YNo33
🎶 Music for my videos www.epidemicsound.com/referra...
🚀 For growing on KZread: www.tubebuddy.com/bas
🏄 Stuff I use daily amzn.to/3HqfMQ2
* Above are affiliate links, which means at no additional cost to you, if you make a purchase using these links we will receive a small commission. It supports us and helps us to continue making more How to Power BI videos!
Thanks for being a part of this channel and all your support! 💪 🙏
#HowToPowerBI​ #PowerBI​ #DataTraining​
#powerbidesktop​ #powerbitraining​ #powerbideveloper​ #DAX

Пікірлер: 115

  • @alicedwonderland7733
    @alicedwonderland7733 Жыл бұрын

    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!

  • @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!

  • @MIRCOR55
    @MIRCOR559 ай бұрын

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

  • @PeterFabian-gu1lp
    @PeterFabian-gu1lp3 ай бұрын

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

  • @ruioliveira4149
    @ruioliveira41497 ай бұрын

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

  • @vishalnasre1251
    @vishalnasre1251 Жыл бұрын

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

  • @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 🙂

  • @patitosamsungtelita
    @patitosamsungtelita10 ай бұрын

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

  • @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.

  • @anneetaylor464
    @anneetaylor4643 ай бұрын

    Thanks, especially for sharing the dimCurrency Table :)

  • @vesnastojanova
    @vesnastojanova Жыл бұрын

    Thank you. Realy good case.

  • @ajaaskelainen
    @ajaaskelainen Жыл бұрын

    Right on top! Great stuff

  • @digitsletters972
    @digitsletters972 Жыл бұрын

    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

  • @arbazahmad7177
    @arbazahmad7177 Жыл бұрын

    Really Amazing...Thanks for this..

  • @unnikrishnansanthosh
    @unnikrishnansanthosh Жыл бұрын

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

  • @ngoduyvu
    @ngoduyvu Жыл бұрын

    Amazing video as usual

  • @alicedwonderland7733
    @alicedwonderland7733 Жыл бұрын

    Thank you, Bas! You make my work shine!

  • @HowtoPowerBI

    @HowtoPowerBI

    Жыл бұрын

    Glad to hear this thx for the support!

  • @edwinarchico439
    @edwinarchico439 Жыл бұрын

    As always, excellent Bas, thank you!

  • @HowtoPowerBI

    @HowtoPowerBI

    Жыл бұрын

    thank you very much for watching again !! :D

  • @Cleanfreak005
    @Cleanfreak005 Жыл бұрын

    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

  • @LeighRadmore
    @LeighRadmore Жыл бұрын

    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

    Жыл бұрын

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

  • @sholder9933

    @sholder9933

    Жыл бұрын

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

  • @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!

  • @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?! ;)

  • @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.

  • @markhenderson3771
    @markhenderson3771 Жыл бұрын

    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.

  • @paulgallagher2987
    @paulgallagher2987 Жыл бұрын

    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)

  • @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!

  • @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.

  • @macilakertous8041
    @macilakertous8041 Жыл бұрын

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

  • @thuytamdang3390
    @thuytamdang3390 Жыл бұрын

    Million thanks!

  • @HowtoPowerBI

    @HowtoPowerBI

    Жыл бұрын

    thank you for watching! :)

  • @theA12d1
    @theA12d1 Жыл бұрын

    thanks!!

  • @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

  • @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.

  • @pakarussiapinto6718
    @pakarussiapinto6718 Жыл бұрын

    Awesome thank you

  • @HowtoPowerBI

    @HowtoPowerBI

    Жыл бұрын

    thx!!! :D

  • @nemnoch
    @nemnoch7 ай бұрын

    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?

  • @K-mk6pc
    @K-mk6pc Жыл бұрын

    I found it increadibly useful.

  • @HowtoPowerBI

    @HowtoPowerBI

    Жыл бұрын

    Awesome!

  • @kathimmaculata
    @kathimmaculata10 ай бұрын

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

  • @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.)

  • @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?

  • @luisfernandomacedo1451
    @luisfernandomacedo1451 Жыл бұрын

    Great Bass!

  • @HowtoPowerBI

    @HowtoPowerBI

    Жыл бұрын

    Thanks 😊

  • @nishantkumar9570
    @nishantkumar9570 Жыл бұрын

    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

    Жыл бұрын

    thanks! here you go :) kzread.info/dash/bejne/l52Wl7puqLXSqps.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.

  • @royhj8966
    @royhj89666 ай бұрын

    Brilliant!

  • @HowtoPowerBI

    @HowtoPowerBI

    6 ай бұрын

    Thx Roy!

  • @crizzy4u764
    @crizzy4u764 Жыл бұрын

    Thanks Bas 😍

  • @HowtoPowerBI

    @HowtoPowerBI

    Жыл бұрын

    thx for watching :D

  • @sebaphilip
    @sebaphilip Жыл бұрын

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

  • @HowtoPowerBI

    @HowtoPowerBI

    Жыл бұрын

    There is a download link in the description

  • @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 ?

  • @John-cq6vh
    @John-cq6vh Жыл бұрын

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

  • @arbazahmad7177
    @arbazahmad7177 Жыл бұрын

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

  • @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

    Жыл бұрын

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

  • @nishanth4323

    @nishanth4323

    Жыл бұрын

    @@HowtoPowerBI 👍👏

  • @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

    Жыл бұрын

    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

  • @nidhi5823
    @nidhi58235 ай бұрын

    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

  • @harrietdrums
    @harrietdrums Жыл бұрын

    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 😭

  • @theshakoone
    @theshakoone Жыл бұрын

    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.

  • @Thalapraga
    @Thalapraga Жыл бұрын

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

  • @garudabowo
    @garudabowo13 күн бұрын

    can someone explain about the four quotation marks functioned?

  • @kenekholm8325
    @kenekholm8325 Жыл бұрын

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

  • @HowtoPowerBI

    @HowtoPowerBI

    Жыл бұрын

    Yes

  • @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

    Жыл бұрын

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

  • @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?

  • @raeesg
    @raeesg Жыл бұрын

    Nice 👍

  • @HowtoPowerBI

    @HowtoPowerBI

    Жыл бұрын

    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.

  • @henryconmorales7348
    @henryconmorales7348 Жыл бұрын

    del lujo....

  • @HowtoPowerBI

    @HowtoPowerBI

    Жыл бұрын

    gracias !

  • @johnkennethonet-makaticand2590
    @johnkennethonet-makaticand2590 Жыл бұрын

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

  • @obagoriolastephen300
    @obagoriolastephen300 Жыл бұрын

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

  • @luispecem
    @luispecem Жыл бұрын

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

  • @TheInfernalwing
    @TheInfernalwing4 ай бұрын

    how to work on between numbers and %?

  • @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.

  • @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.

  • @theminimalistings
    @theminimalistings Жыл бұрын

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

  • @Barrett-WB
    @Barrett-WB8 ай бұрын

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

  • @HowtoPowerBI

    @HowtoPowerBI

    8 ай бұрын

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

  • @Barrett-WB

    @Barrett-WB

    8 ай бұрын

    @@HowtoPowerBI Thanks!

  • @narendrababu2287
    @narendrababu2287 Жыл бұрын

    😍

  • @zxccxz164
    @zxccxz1645 ай бұрын

    but how do you do this if you use SSAS?

  • @vishwassharma3312
    @vishwassharma3312 Жыл бұрын

    👍👍❤️❤️

  • @bobert13581
    @bobert13581 Жыл бұрын

    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

    Жыл бұрын

    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

  • @TamNguyen-cy3ix
    @TamNguyen-cy3ix11 ай бұрын

    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

    10 ай бұрын

    kzread.info/dash/bejne/eIqe1rmopaebdto.html

  • @scandinavia_adventure
    @scandinavia_adventure Жыл бұрын

    ❤️

  • @nishanth4323

    @nishanth4323

    Жыл бұрын

    Bas

  • @menkar91
    @menkar91 Жыл бұрын

    Colombia 💪

  • @HowtoPowerBI

    @HowtoPowerBI

    Жыл бұрын

    Netherlands 💪🙃

  • @vishwassharma3312
    @vishwassharma3312 Жыл бұрын

    Kindly provide the video of Google Data Studio.

  • @HowtoPowerBI

    @HowtoPowerBI

    Жыл бұрын

    maybe one day

  • @imperia81
    @imperia81 Жыл бұрын

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

Келесі