Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have the following bar chart:
When I add a legend to this chart, the values change:
Does anyone know why this happens?
Solved! Go to Solution.
Hi @Sohan ,
Believe this is a repetion of the post below please see the same answer I have posted on the previous post
https://community.powerbi.com/t5/Desktop/Data-changing-when-adding-legend/m-p/1978919
Your data is not changing you are changing the context of your data so that is why you are getting different results.
In your case you are making the distintc count of patient Number when you have the calculation at the week level a single patient is consider only once even if he appears in more than one Gebruiker.
However when you add the Gebruiker the context changes and you add a different level of details so now you are picking up the same patient number once for each Gebruiker.
Let's look at the example below:
If you select the patient 729-8773 on week 3 you have a single patient, however it is consider in 3 different Gebruiker so when you add the legend you get a total of 3 patients:
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Sohan ,
Believe this is a repetion of the post below please see the same answer I have posted on the previous post
https://community.powerbi.com/t5/Desktop/Data-changing-when-adding-legend/m-p/1978919
Your data is not changing you are changing the context of your data so that is why you are getting different results.
In your case you are making the distintc count of patient Number when you have the calculation at the week level a single patient is consider only once even if he appears in more than one Gebruiker.
However when you add the Gebruiker the context changes and you add a different level of details so now you are picking up the same patient number once for each Gebruiker.
Let's look at the example below:
If you select the patient 729-8773 on week 3 you have a single patient, however it is consider in 3 different Gebruiker so when you add the legend you get a total of 3 patients:
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHey @Sohan ,
it's a little tricky to say because your data model is a mess.
First of all the visuals use different filters. Here the first visual:
And the second visual:
But even when they are the same, the result is still different.
To be honest I'm pretty sure it comes from the data model. Change your data model to fact and dimensional tables and you won't have strange behavior like that.
Start with the following article that describes the basics pretty well:
Basics of Modeling in Power BI: Fact Tables - RADACAD
User | Count |
---|---|
77 | |
76 | |
44 | |
30 | |
26 |
User | Count |
---|---|
97 | |
91 | |
52 | |
47 | |
46 |