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
Anonymous
Not applicable

Distinctcount measure: Stacked column totals with vs table totals behaviour

Hello I have one issue that I just cannot figure out why it behaves this way, the issue is the way PBI calculates totals while in a stacked column vs a table.  So the take this simple dataset as an example

Project IDStageClient
12AMain
13BMain
12BMain
13AMain
14AMain
14BMain

 

After creating a simple measure where:  Number of distinct projects = DISTINCTCOUNT (Project ID) and applying it on a table

I get the table below which is correct I have 3 distinct projects that are on stage A and 3 that are on stage B (since all three projects have both stages they are accounted for in both groups), as for the total it shows me correctly that there are only 3 projects(so it is accounting for each of them only once). I know that a table total is not the sum of the lines above because of its row context and all... so the value is correct.

TallesLessa_1-1650319893454.png

 

But by changing the visual from a table to a stacked colum chart I get this

TallesLessa_2-1650320181996.png

 

It shows me correctly that I have 3 differente projects on stage A also 3 on stage B, but the total Number of projects is not 6 should be 3, I get that its simply summing both values because they are stacked but tha't is a lil misleading since I just switched from a table to a stacked column chart.

I tried to alter the context of the total by using Hasonevalue(),isinscope(), isfiltered() but that only changes the total while in table format (as expected because of well... the context) What I am trying to achieve is to change the total value of the stacked column to show the count of distinct projects instead of the sum by category. 

 

So my question is why does it behaves this way and is there a way to change this behaviour without relying on custom visuals (using charticulator for instance)?

Thanks

 

 

 

1 ACCEPTED SOLUTION
v-rongtiep-msft
Community Support
Community Support

Hi @Anonymous , 

This seems to be by design. The stacked colum chart total value is the use of a fixed formula.

Please refer to the following sample.

vpollymsft_0-1650510962819.png

vpollymsft_1-1650510990093.png

 

If you want to change the total value of stacked colum chart, please create an idea here and vote for it.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-rongtiep-msft
Community Support
Community Support

Hi @Anonymous , 

This seems to be by design. The stacked colum chart total value is the use of a fixed formula.

Please refer to the following sample.

vpollymsft_0-1650510962819.png

vpollymsft_1-1650510990093.png

 

If you want to change the total value of stacked colum chart, please create an idea here and vote for it.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

This should be treated as a bug. No design excuse here .. dustinctcount should evaluate all selected data whether in a table or any other visual and return the same result. 

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.