Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
New_Folder
Helper I
Helper I

Show blank " " on CARDS when nothing is selected on a Graph with Drill down.

I have a table of dates and number of instances per date. I set up a drill down. I would like to show the Year when drilling down. Currently the option that I can see is Min - Max. I am not familiar with DAX, but can follow instructions.

The first table shows the Years and the second is the drilled down. As you can see, it does not show which Year was selected. I would like the Year to show either on the Title or on a separate Card visual.

New_Folder_0-1661351026333.png

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@New_Folder , You can create a measure

 

if(isfiltered(Date[Year]), selectedvalue(Date[Year]), "All Year")

 

You can use this measure in title or card

View solution in original post

3 REPLIES 3
PaulDBrown
Community Champion
Community Champion

First, go into the x-axis in the formatting pane and make sure the Type is set to coninuous.

Expand the visual as

2022-08-24.png

go into the x-axis in the formatting pane and turn off concatenate labels.

concat labels.png

 

 

 

Optionally, you can add a dynamic title to the visual to help guide your users. Create a measure along the lines of:

Year Title =
VAR _MinYear =
    CALCULATE ( MIN ( 'Calendar Table'[Year] ), ALL ( 'Calendar Table'[Year] ) )
VAR _MaxYear =
    CALCULATE ( MAX ( 'Calendar Table'[Year] ), ALL ( 'Calendar Table'[Year] ) )
VAR _Sel =
    CONCATENATEX ( VALUES ( 'Calendar Table'[Year] ), 'Calendar Table'[Year], ", " )
RETURN
    IF (
        ISFILTERED ( 'Calendar Table'[Year] ),
        "Sales for " & _Sel,
        "Sales from " & _MinYear & " to " & _MaxYear
    )

In the formatting pane, go into General -> Title and add the measure to the conditional formatting option, 2022-08-24 (1).png

 

Captura de pantalla 2022-08-24 174744.png

 Now you are ready to go. Just beware that the "Drilling" / Hierarchy ribbon can be confusing to users. (Here the title really helps)

1) "Go to next level of the hierarchy" displays aggregated data by month for all the years 

Hierarchy.gif

 

2) "Expand all down one level in the hiearchy" still displays data for all the years, but by month and year:

Expand.gif

 3) By turning on the "drill-down" option, you can access a particular year data by clicking on a data point

Drill.gif

 

Hope this helps

 

 

 

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






amitchandak
Super User
Super User

@New_Folder , You can create a measure

 

if(isfiltered(Date[Year]), selectedvalue(Date[Year]), "All Year")

 

You can use this measure in title or card

I might miss a detail here, should I replace something on the formula you provided? Im getting this error,

 

New_Folder_0-1661360059184.png

I think I got it working. How do I format to remove the thousands comma separator?

New_Folder_1-1661360423376.png

ugh, nevermind, found it.. thank you very much awesome internet people.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.