Dynamic labels in Power BI using DAX

Поделиться
HTML-код
  • Опубликовано: 12 дек 2024

Комментарии • 119

  • @TheGothicSunrise
    @TheGothicSunrise 4 года назад +4

    omg you're videos are God send and I love your energy and the way you present! Thank you!

  • @SubodhanGadgil
    @SubodhanGadgil 5 лет назад +3

    Thanks Patrick for the videos. I would like to know how do you select records from a table within a date-range, where start date and end date are in two separate measures?

  • @FredKaffenberger
    @FredKaffenberger 7 лет назад +1

    Patrick-- great use of SELECTEDVALUE with drillthrough filters! I use a Card visualization because I get greater control of the formatting: background & text color, and no need to have a title for my title. However, neither a card nor a table scale well with phone layout... horizontal scrolling is a bummer.

  • @wynhopkins4023
    @wynhopkins4023 7 лет назад

    That's really useful, thanks. I've been using the concatenate list of values quick measure for displaying multiple selected items in the same field. Your demo is perfect for single values from multiple fields. Thanks again

  • @Wuzadi
    @Wuzadi 4 года назад

    Patrick! You are the man, thanks a bunch for this. The entire video was easy to follow and I appreciate the work put into it.

  • @yankysvelte3838
    @yankysvelte3838 7 лет назад +1

    Great! just one point the if condition is extra you could just use the AlternateResult and set it to All Colors

  • @BluedvdMaster
    @BluedvdMaster 6 лет назад +1

    Love the selected value dax expression.

  • @98802ohhey
    @98802ohhey 2 года назад

    Sweet video, clean & to the point

  • @aryansinanan9878
    @aryansinanan9878 6 лет назад

    Just a quick note about SelectedValue you can set an alternate value so the ISBLANK isnt necessary.
    eg. Selected Project = var projetid = SELECTEDVALUE('Project'[Proj ID], "All") return "Project Id: " & projetid
    I have listed "All" as the alternate when [Proj ID] does not exist.

  • @wouter94
    @wouter94 4 года назад +1

    What we still need in Power BI, is being able to execute DAX variables, similar to dynamic T-SQL, thereby creating extremely dynamic DAX code and programmatic opportunities.
    If you agree, please up-vote the idea here: ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/40686367-dynamic-dax-executable-variables-treat-variab

  • @FredLorrain
    @FredLorrain 6 лет назад +4

    The test on isblank is not required. SelectedValue has 2 parameters. Right usage is : SelectedValue (Table [column], "default value")

    • @MrBond-lk1dj
      @MrBond-lk1dj 6 лет назад

      won't the IF statement always evaluate to TRUE if the is black function is removed. and the result will always be "Color is : All colors" ?

  • @leoespejo7437
    @leoespejo7437 5 лет назад

    OMG! now this is simply F... abulous A-MA-ZING! how easy and how strong explanation. I remember I had a requirement to do something like this but as the data source was SSAS we were trying to implement some logic directly in the cube, but the alternative from PBI is just simple and effective. Good to have this in the arsenal. Thanks!

  • @reggierevello21
    @reggierevello21 7 лет назад +3

    Great post Patrick! As always!!!

  • @kristinns72
    @kristinns72 7 лет назад +1

    Using SELECTEDVALUE for this now, BUT definitely have to start using variables, like that a lot!

  • @jeffreygarlisch6145
    @jeffreygarlisch6145 6 лет назад +2

    This is great thanks so much!
    Is it possible to display more than one selected value when drilling through?

  • @angelamessina7187
    @angelamessina7187 3 года назад +1

    Exactly what I was looking for

  • @AnilKumar-io1on
    @AnilKumar-io1on 4 года назад

    Thankyou Patrick for all your videos. Please let me know if there is any way to detect device (Mobile/Desktop) deatils from current Power BI report.

  • @milenchavdarov9068
    @milenchavdarov9068 4 года назад +1

    Hi, Is it possible to name the table headers based on some filtering. For example: My report contains data for 3 different periods - month, day, week. And I want when I change the period the correspondent column headers to become - lets say DayValue, WeekValue, MonthValue

  • @captainVooo
    @captainVooo 6 лет назад +1

    very cool! thanks! When I did something similar, I had a lot of formatted info to show including email addresses and hyperlinks and I just used the html viewer and had a column in my data that concatenated my html. Then the drillthrough filter limited the display to the single item.

    • @GuyInACube
      @GuyInACube  5 лет назад

      very cool! thanks for watching!

  • @suenoble1541
    @suenoble1541 3 года назад +1

    Hi. That was great, very informative. How would you go about showing if you had selected multiple colours?

    • @SmittenandBitten
      @SmittenandBitten 2 года назад

      yes same issue. how can it be the example only caters for one value

  • @ashwinshankar
    @ashwinshankar 4 года назад +1

    Can you make the chart title dynamically change based on the selection within the same chart ??

  • @joshblackman2380
    @joshblackman2380 7 лет назад

    I've been using measures to do this so far. The DAX you just demonstrated is cleaner and I will adopt it going forward. BUT!!!, it doesn't address the main issue. The header is displayed in a separate visual (in this case a table). That doesn't translate to a clean professional look on mobile reports. Need the capability to use measures in titles and axes labels for all / most visuals. Even though your demo works, I view this as a partial solution / work around.

  • @TheYteds
    @TheYteds 7 лет назад +1

    Hi Patrick, love your videos. Just wondering how you do this if you are connecting to a SSAS 2012 Tabular model, which doesn't have SELECTEDVALUE. Thanks

  • @sumitkhandelwal1721
    @sumitkhandelwal1721 7 лет назад +1

    Hi Patrick, I have been using "FIRSTNONBLANK" function to do the same trick.

    • @GuyInACube
      @GuyInACube  7 лет назад

      Awesome! Yes that is another way to do it!

  • @saumyaadlakha7258
    @saumyaadlakha7258 4 года назад

    Thanks for the video. Helped me with a requirement

  • @wilnajansenvanrensburg772
    @wilnajansenvanrensburg772 3 года назад

    Hi. Thank you this is great. What about if multiple values are selected. I have added the selected variable to a text box and it only returns the first value. What should I do?

  • @sidharthakumarmahato6722
    @sidharthakumarmahato6722 4 года назад

    Hi, I want to change the label only in case of drill-down, but it's changing if I select any value on the bar chart?
    In my case instead of setting the dax on the title of the graph, I used it on a text box for better and field.
    Dax which I am using : A_TITLE_BAR_1_3 =
    var selPosition = SELECTEDVALUE ( application_overview[position_type])
    return
    IF(ISBLANK(selPosition),"Average Time To Resolution By Position Type(Days)","" &
    "Average Days Per Workflow State ("&selPosition&")")

  • @mukund8238
    @mukund8238 4 года назад

    Hi,
    Please let me know if there is any way to edit/choose Query or List parameters in Power BI service (just like you had done here in PBI desktop using Edit Parameters option.
    Like here u can choose the value from tcountries parameter in desktop but is it possible to choose that parameter values in Power bi service as well?

  • @Thias14
    @Thias14 5 лет назад +3

    Hi Patrick, do you have an easy way to show the values of multiple selected items in the same visual?

    • @eugeny184
      @eugeny184 5 лет назад

      I was going to ask an exact same question

    • @MishaBEZEDE
      @MishaBEZEDE 5 лет назад

      Use concatenatex(

    • @AJM2183
      @AJM2183 4 года назад

      @@MishaBEZEDE in the same expression?

    • @MishkyGammy
      @MishkyGammy 4 года назад

      @@AJM2183 as a separate measure

    • @AJM2183
      @AJM2183 4 года назад

      @@MishkyGammy I found Patrick's other video where he addresses the issue. All good for me now!

  • @AJM2183
    @AJM2183 4 года назад

    This is awesome, thanks Patrick. I have noticed, though, when trying to filter multiple but not ALL of a Name field, it comes up with the "All Names" instead of listing the names... Any thoughts?

  • @abdulazad444
    @abdulazad444 6 лет назад

    Hey Patrick, pretty new to Power BI, I wanted to show and hide columns based on slicer selection, columns are like Effective_Date, Purchase_Date, Quantity, Order_Number. How can I achieve this. I have seen so many videos of show/hide on measure columns not on dimension or attribute or date columns. Your video on this will be much appreciated

  • @raghavsarda4310
    @raghavsarda4310 2 года назад

    Can we dynamically change the "Category Label" for any visual like card or multi row card or any work around

  • @melanies.9071
    @melanies.9071 4 года назад +1

    Thanks so much for sharing this. Super helpful.

    • @GuyInACube
      @GuyInACube  4 года назад

      Glad it helped you! Thanks for watching! 👊

  • @jeniferdefigueiredo4500
    @jeniferdefigueiredo4500 5 лет назад

    Thanks Patrick! This is just what I was looking for! Your videos are great!

  • @neoeason92
    @neoeason92 5 лет назад

    Hi Patrick, can you teach us how to have editable commentary box/long text that responds with dynamic data on my PBI report/dashboard?
    I'd like to input and delete words on my dashboard (that follow the change of my dynamic data. It's such a big demand but no one has the demo.

  • @rboehmer6670
    @rboehmer6670 5 лет назад

    Thanks for the great videos. Do you have any videos on using this principle but dynamically changing an image?

  • @victorianavarrete5934
    @victorianavarrete5934 3 года назад

    How could you do this for a column? I know how to do it in SSRS but Power BI is a new venture and am wanting to replicate what we have with some tweaks. The columns need to say the date plus so many dates depending on todays date

  • @jonashva7704
    @jonashva7704 5 лет назад

    Cool, but I also hoped it would be possible to use these variables in the column titles. Would have made this so much better!

  • @juansepowerplatform
    @juansepowerplatform 7 лет назад

    Will the Selected value method work if you select multiple colors, for example blue and red or multiple countries?

  • @JMRG2992
    @JMRG2992 4 года назад

    I got a question, if I have a bar chart, but I want to display two associated values, for example i have column of percentage and a colum of complete task, i want to display them as percentage in the bar, but when i click or put the mouse uppon the bar, I want it to display the 2 values. like 2 labels, one: the percentage, the second: the data with has the colum of the completition of the task-.
    How can i do that?

  • @gondebas
    @gondebas 6 лет назад

    3:54 I have an owlful vertical line there of grey color. The vertical line where you click at 3:54 to expand column in your case is white or invisible. How to make it so?

    • @GuyInACube
      @GuyInACube  6 лет назад

      You can modify the color settings of a table or matrix when you select the paintbrush section in Power BI Desktop. There are pre-designed looks, of you can fine tune it.

  • @HillChris1234
    @HillChris1234 6 лет назад

    For those of you getting this error: "Function 'COUNTROWS' is not supported in this context in DirectQuery mode"
    Please make sure you enable Unrestricted Measures in DirectQuery mode:
    community.powerbi.com/t5/Desktop/Filter-is-not-working-in-Direct-query-mode/td-p/133492

  • @vladimirpino5931
    @vladimirpino5931 6 лет назад

    Great video! I am trying to create the same thing but with comments. I have three countries and I would like to have comments specific for each country but also a comment when no country is selected (general comment for the nordics), do you know if this is possible?

  • @MatameisterZ
    @MatameisterZ 5 лет назад

    Thank you for the cool videos, let me ask you something is there any special software for your mouse pointer, would be nice to use it for my students, I' currently using ZoomIt, I think that you are using a much better software can you recommend me which one?, Thanks!!

  • @andredataviz
    @andredataviz 4 года назад

    awesome videos.. thanks man.. hugs from brasil

  • @culpritdesign
    @culpritdesign 7 лет назад +4

    "What a silly bot you are!" HAHA. Great use of DAX!! Thanks for the videos as always!

  • @aruns8412
    @aruns8412 5 лет назад

    Hi Patrick, Is there a way to wordwrap the text in legends in the visualization?

  • @jeffbeaty6955
    @jeffbeaty6955 6 лет назад

    I'm trying to figure out how to do the same thing but by extracting the month and year from a selected date range when the range selected is within the same month/year. For example, Jan 1, 2018 to Jan 31, 2018 I want the label to show January 2018. Is this possible?

  • @mrboloban25
    @mrboloban25 5 лет назад

    Thanks for the video Patrick. But what if I have filter with multiple selection? How to show a legend "Multiple Selection" in my label?

    • @GuyInACube
      @GuyInACube  5 лет назад

      Have a look at the tooltip quick measure. It shows an example of this. Basically an IF and then concatenate a string after it.

  • @snapdragon7505
    @snapdragon7505 5 лет назад

    Can I dynamically use a measure on the title text of the visual??

  • @deanj5961
    @deanj5961 5 лет назад

    Thanks for the video! We need this same functionality for multiple selections- any suggestions?

    • @deanj5961
      @deanj5961 5 лет назад

      Found the answer here: ruclips.net/video/SjSKCZtiNlI/видео.html
      Create a Quick Measure- Concatenated List of Values
      Thanks Guy in a Cube!!

  • @ericsaltzmann4412
    @ericsaltzmann4412 5 лет назад

    Patrick,
    We need a SelectedMeasureDescriptionString function so we can display the description property from SSAS to people who might not understand the business logic. I'm thinking custom tooltip page
    Please help,
    Eric

  • @peggysuemarlin5131
    @peggysuemarlin5131 7 лет назад

    Hi Patrick, awesome shirt. So I've been using a card visual for this, with stuff like Title = "Project:" and Field = First Project since only 1 project is selected when you do a drillthrough. What's the added benefit of using DAX for it instead?

  • @mansoorshaik7263
    @mansoorshaik7263 6 лет назад

    Grt !! But we don't need any measures (DAX) like Selected Color and Selected Country ... we can directly use the drill through functionality provided by PBI as it catch the event like SELECTED VALUE by default .. Use the color and country as drill though parameters in the details page and that's it DONE !!! ..Let me know if I miss anything here ...

  • @shanikihan
    @shanikihan 6 лет назад

    hi! what's the difference between selectedvalue and isfiltered?

  • @ThalassaMavri
    @ThalassaMavri 5 лет назад +1

    Thank you Patrick, very helpful!

    • @GuyInACube
      @GuyInACube  5 лет назад

      Glad it helped! Thanks for watching 👊

  • @fabdatasolutions
    @fabdatasolutions 5 лет назад

    Hi Mate, which laptop do you use? Thanks and I love your videos btw

  • @kelly.tanguay
    @kelly.tanguay 6 лет назад

    If I Want to change all the tilte of the chart (even the colum name) for their good traduction (english to spanish, german, ...) and make the colum name change, how can I do it?

  • @abhilash1in
    @abhilash1in 4 года назад

    How can I do this if I'm using SSAS multidimensional model?

  • @peterrobinson9935
    @peterrobinson9935 5 лет назад

    Do we have to have bright cyan text on a bright white background in your coding, please? It's near impossible to read due to lack of contrast!

    • @GuyInACube
      @GuyInACube  5 лет назад

      Appreciate the comment. I believe you are referring to the DAX editor within Power BI Desktop and the syntax highlighting it has. We don't really have control over that, unfortunately. I believe DAX Studio does the same, although I'd have to look if you can control the colors similarly to Visual Studio.

  • @cheenuguna
    @cheenuguna 5 лет назад

    Cool, Thanks - Is it possible to rename a measure based on Source Name (Eg, I have created 200 measures,50 per year for 4 years like Revenue, Cost, GM etc), when I replace 2018 data with 2019 Data, can my measure name change from 2018 Revenue to 2019 Revenue

    • @rajkapil170
      @rajkapil170 5 лет назад

      Wondering if you ever got a solution to this?

  • @dannyaguirre2309
    @dannyaguirre2309 7 лет назад

    Cool video, but where can I get that t-shirt?

  • @AnilKumar-gu4wf
    @AnilKumar-gu4wf 5 лет назад

    i have found the issue working with the direct query please find the query and error. please comment if anyone get's the same issue.
    DAX : Country = var selectedcountry = SELECTEDVALUE(DimSalesTerritory[SalesTerritoryCountry]) return "Country: "& IF(ISBLANK(selectedcountry), " OverAllTerritory", selectedcountry)
    Error : Function 'COUNTROWS' is not supported in this context in DirectQuery mode.

  • @josericardo3015
    @josericardo3015 7 лет назад

    Simple and very useful!! Tks

  • @Thelion.1990
    @Thelion.1990 4 года назад

    How do I change my data labels from % to number?

  • @semperdiscendum7439
    @semperdiscendum7439 6 лет назад

    Awesome!! Thank you!!👍👍

  • @AliTwaij
    @AliTwaij 5 лет назад

    Excellent

  • @Rosirisuribe
    @Rosirisuribe 3 года назад

    This is great! but... How to you do it using a card?

    • @Rosirisuribe
      @Rosirisuribe 3 года назад

      Forget it, i just changed the visual to a card.

  • @appletvhome7937
    @appletvhome7937 7 лет назад

    Thanks for the video.

  • @praveenpatil282
    @praveenpatil282 6 лет назад +1

    Cool feature, very helpful. Ths Bro!

    • @GuyInACube
      @GuyInACube  6 лет назад

      Thanks for watching Praveen!

  • @joseberrios3582
    @joseberrios3582 7 лет назад

    Increíble de verdad, tengo un conocimiento de como usar Power BI, pero me gustaría obtener una certificación de Microsoft, ¿ como podría obtenerla?, muchas gracias de antemano!

    • @Jonathan.Tovar.1988
      @Jonathan.Tovar.1988 7 лет назад

      Jose Berrios puedes tomar el siguiente examen: www.microsoft.com/en-us/learning/exam-70-778.aspx

    • @joseberrios3582
      @joseberrios3582 7 лет назад

      Jonathan Tovar R muchas gracias.

  • @djtv5511
    @djtv5511 4 года назад

    How to display a word equivalent to a range number?

  • @paulaadrianasouza6566
    @paulaadrianasouza6566 7 лет назад

    Hello, if I select two values it shows a error. How can I do a measure that allow to show more than one value selected?

    • @BigCheese-w8s
      @BigCheese-w8s 6 лет назад

      Hi Paula, i hope you have figured this one out by now, but if not, here is how i achieved what you are asking:
      Selected Stuff = IF(ISFILTERED(TableName[ColumnName]), CONCATENATEX(values(TableName[ColumnName]),TableName[ColumnName], ","), "No Filter")

  • @janeilsonsousa9508
    @janeilsonsousa9508 6 лет назад

    Hi Mr. Patrick, How are you?
    I'm from Brazil and like much your movies.
    Tks so much for teaching.
    Please, help me?
    I need to compare the same criterial of January and February However I have three criteria at February and January two, I want it to appear just compared to january, that is two.
    please, you understand?
    If yes, can you're me help?
    TKS.
    Janeilson de Sousa

  • @DiegoAndresDazaDavalos
    @DiegoAndresDazaDavalos 5 лет назад

    Hi Guys, I'm using this to select the current date selected:
    Selected Date =
    VAR SelectedDate = SELECTEDVALUE('Date Init'[Selected])
    RETURN
    IF(ISBLANK(SelectedDate)
    ,0 ,SelectedDate)
    Then I want to compare this selected value to another table to put a flag:
    Flag =
    IF ('Date'[Selected]=[Selected Date] ,1,0)
    Someone know why the second formula is not working, and how I can solve this?

  • @karljolivet5991
    @karljolivet5991 6 лет назад

    I should of watch this video last week. Took me for ever to find out that I had a filter selected and I knew my data was wrong.

  • @niranjanmakkuva4639
    @niranjanmakkuva4639 7 лет назад

    how to handle if you have more than 1 value (say from the slicer where i can select multiple values)

    • @BigCheese-w8s
      @BigCheese-w8s 6 лет назад

      Hi Niranjan, i hope you have figured this one out by now, but if not, here is how i achieved what you are asking:
      Selected Stuff = IF(ISFILTERED(TableName[ColumnName]), CONCATENATEX(values(TableName[ColumnName]),TableName[ColumnName], ","), "No Filter")

    • @jagdishdamania3426
      @jagdishdamania3426 6 лет назад

      Thanks Jeremy, this is what I was looking for :)

  • @isaacfigueroa
    @isaacfigueroa 6 лет назад

    Thank you!!! very useful!!!!!!!!!!!!! gracias!!!!

  • @LandscapeInMotion
    @LandscapeInMotion 6 лет назад +1

    Nice work! Just a little too fast towards the end there...

    • @GuyInACube
      @GuyInACube  6 лет назад

      Appreciate the feedback! Thanks for watching!👊

  • @shivendrakumaryadav5811
    @shivendrakumaryadav5811 5 лет назад

    Nice.. it helped. :)

  • @FullMoonHatch
    @FullMoonHatch Год назад

    It doesn't handle multiple selections in the same dimension.

  • @zackpe
    @zackpe 2 года назад

    Just show the screen instead of zooming at you talking and back to the screen, we can hear you without seeing you.

  • @RaghavendraGowda7
    @RaghavendraGowda7 4 года назад

    God

  • @shamsulhaque3016
    @shamsulhaque3016 2 года назад

    Why u shouting every single time?? 😂😂😛

  • @ringovski1980
    @ringovski1980 5 лет назад

    Stop switching the camera and stay in Power Bi it makes the video unwatchable.

    • @GuyInACube
      @GuyInACube  5 лет назад

      Appreciate the feedback Ringo! Thanks for watching 👊

  • @tengnbiiga
    @tengnbiiga Год назад

    Is there a way to get labels in a visual to change dynamically, for example if I want to create a multilingual pie chart?

  • @nachikettikekar2903
    @nachikettikekar2903 3 года назад

    Hi Patrick, Is it possible to have dynamic column names on based on selected filter ? When we are using Table visuals.