The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi everyone,
Could you help me with this problem please :
I'm showing in a bar graph the percentage of people who drive wagons, vans and suv, like so :
The data is from a survey in which the item "van" was added after 2021.
If i don't select a year in the slicer "year", the results for "van" can be misinterpreted as "24% of the 9968 people drive a van", which is not representative since the question wasn't asked prior to 2022.
Would you know a way to solve this problem ?
I thought about showing two graphs : one with the data from 2018 to 2021, and another one with the following years...
Here's the link :
Thank you for your advice
Solved! Go to Solution.
Hi @AnthNC ,
@raji_n said adding the year to the x-axis is one way.
And @AnthNC you can also try this, put the field Year into the small multiples:
Or you can use this DAX to create a measure:
Measure =
IF(
NOT ISFILTERED('table1 vehicles'[Year]),
IF(
MAX('table1 vehicles'[Attribut]) = "Van",
"After 2022",
BLANK()
),
BLANK()
)
Place this measure in Data labels > Details:
Then the "After 2022" field will appear in the Data label:
I changed the color and font size.
And this will not affect the visual effect after you select the slicer:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you very much guys
Hi @AnthNC ,
@raji_n said adding the year to the x-axis is one way.
And @AnthNC you can also try this, put the field Year into the small multiples:
Or you can use this DAX to create a measure:
Measure =
IF(
NOT ISFILTERED('table1 vehicles'[Year]),
IF(
MAX('table1 vehicles'[Attribut]) = "Van",
"After 2022",
BLANK()
),
BLANK()
)
Place this measure in Data labels > Details:
Then the "After 2022" field will appear in the Data label:
I changed the color and font size.
And this will not affect the visual effect after you select the slicer:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@AnthNC pleaase refer my screenshot earlier, where I have added the year in the x axis, thats one way to represent.
Values are appearing correct when I checked the pbix file,
look at the graphs below, the numerator and denominator are dividing properly and the reason why you see van in the bar is because by default the when nothing is selected in the year slicer, all the data is shown.
thank you @raji_n
The calculation is correct, this is not a problem.
I am just asking if you guys know a way to show somehow that the 24% corresponding to van drivers (if no years are selected in the slicer) are only representative of the people who were interviewed from 2022 to today...