Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Good morning,
I wonder if anyone can help me with this. I have table that has sales over a period of 4 years for various brands. I wanted to show the market share of the brands using a tree map and a play axis so the user is able to see how the market share has changed over time.
To do this, in my Treemap, I have the following expression:
Total Sales by Year Selected =
VAR myyear =
IF(SELECTEDVALUE(dimCalendar[Year])=BLANK(),2021,SELECTEDVALUE(dimCalendar[Year]))
RETURN
CALCULATE([Total Sales],FILTER(dimCalendar,dimCalendar[Year]=myyear))and the category is [Brand]
My Play Axis field is [Year]
For the years 2018, 2019 and 2021... the chart works perfectly. HOWEVER, in 2020, the chart looks as follows:
The highlighted values are the correct amounts for 2020. However, the rest of the boxes are all the values for 2021.
I assume this is due to the following:
The reason I have used this variable is that I want the chart to default to 2021 when the play axis is not running and therefore no value is selected. But naturally, in years where there is no sales and the play axis is running I would like those to be not visible.
Can someone please help me with this?
Kind regards,
Paul
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 5 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 16 | |
| 8 | |
| 7 | |
| 7 |