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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
irfandbintang
Frequent Visitor

How to Build a Stacked column chart by distinct count by category

Hi Good Morning All, i want to ask about my case. So what i want to build is a stacked column chart, the axis is Location, legend is the delivery status (delay/not), value is total unique shipment(there are multiple shipment number).
 
What i want to ask is how i can calculate the distinctcount of shipment by Location? 1 Shipment number can be in multiple row & Location. For reference i give the snapshot of my dataset:
 
Would really appreciate if someone know the answer/formula. Thanks All 😁
 
Capture.PNGCapture1.PNG
1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hello @irfandbintang ,

You could try it that way.

Measure = CALCULATE(DISTINCTCOUNT('Table'[Shipment ]),ALLEXCEPT('Table','Table'[Location]))

Reference: ALLEXCEPT

DISTINCTCOUNT

Best regards

Stephen Tao

If this post helps,then consider Accepting it as the solution to help other members find it faster.

View solution in original post

3 REPLIES 3
v-stephen-msft
Community Support
Community Support

Hi @irfandbintang ,

Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.


Best Regards,
Stephen Tao

v-stephen-msft
Community Support
Community Support

Hello @irfandbintang ,

You could try it that way.

Measure = CALCULATE(DISTINCTCOUNT('Table'[Shipment ]),ALLEXCEPT('Table','Table'[Location]))

Reference: ALLEXCEPT

DISTINCTCOUNT

Best regards

Stephen Tao

If this post helps,then consider Accepting it as the solution to help other members find it faster.

amitchandak
Super User
Super User

@irfandbintang , not very clear. You can use location on axis and distinctcount(Table[Shipemnt])

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.