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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Remove duplicates on Stacket column chart

Hello,

I have a pbix which is supposed to show how many requests are sent to shared mailbox. For that every subject needs to be deduplicated before putting in on chart.

 

For now I have a stacked column chart with number of distinct subjects every day but I need to make it stacked column chart with number of distinct values overall just as outlook shows conversations so if the same subject was sent in several days it should be only counted on last date.

 

I tried to make a measure to eliminate duplicates and then putting it on chart but it doesn't work, how should I change it to make it work?

 

1 ACCEPTED SOLUTION
Kedar_Pande
Super User
Super User

Measure:

LastOccurrenceCount = 
CALCULATE(
DISTINCTCOUNT(YourTable[Subject]),
FILTER(
YourTable,
YourTable[Date] = CALCULATE(MAX(YourTable[Date]), ALLEXCEPT(YourTable, YourTable[Subject]))
)
)

Add this measure to your stacked column chart to show distinct subjects, counted only on their last occurrence date.

 

If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

View solution in original post

2 REPLIES 2
Kedar_Pande
Super User
Super User

Measure:

LastOccurrenceCount = 
CALCULATE(
DISTINCTCOUNT(YourTable[Subject]),
FILTER(
YourTable,
YourTable[Date] = CALCULATE(MAX(YourTable[Date]), ALLEXCEPT(YourTable, YourTable[Subject]))
)
)

Add this measure to your stacked column chart to show distinct subjects, counted only on their last occurrence date.

 

If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn

Anonymous
Not applicable

Thanks very much it helped a lot! 🙂

Helpful resources

Announcements
Top Kudoed Authors