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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Total by different Dimension

Hi,

I have 2 below visuals, the first visual is giving the correct total = 51 for the measure 'Distinct Counts' and it has a filter which is on the second measure 'Total Counts'>1.

In the second visual I want to see it by state not Job Number, but it gives me wrong total = 2170 with the filter 'Total Counts'>1.

The DAX are as below:
Distinct Counts =
DISTINCTCOUNTNOBLANK( Tow[Job Number])

and

Total Counts = COUNTROWS( Tow)

I know I will need to use sumx with summrize, but I can't get it to work

 

Can you please help.

 

2021-03-30_16-03-30.png

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , For Distinct Count > 1

Try like

sumx(filter(Values( Tow[Job Number]) , [Distinct Counts] >1),[Distinct Counts])

 

distinct count can behave differently based on group by

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please correct me if I wrongly understood your question.

please try to write measure like below.

Measure = 

VAR _newtable = filter ( summarize (table, jobnumber column, "@totalcount", your total count measure) , [@totalcount] >1)
RETURN

sumx (_newtable, [@totalcount])

 

If it is Ok with you, please share your sample pbix file, then I can try to come up with a

Hi, My name is Jihwan Kim.

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

more accurate measure.

 

Thank you.

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Thank you so much @amitchandak , it worked.

Appreicate it.

Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please correct me if I wrongly understood your question.

please try to write measure like below.

Measure = 

VAR _newtable = filter ( summarize (table, jobnumber column, "@totalcount", your total count measure) , [@totalcount] >1)
RETURN

sumx (_newtable, [@totalcount])

 

If it is Ok with you, please share your sample pbix file, then I can try to come up with a

Hi, My name is Jihwan Kim.

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

more accurate measure.

 

Thank you.

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Thanks @Jihwan_Kim , your solution also worked. great.

amitchandak
Super User
Super User

@Anonymous , For Distinct Count > 1

Try like

sumx(filter(Values( Tow[Job Number]) , [Distinct Counts] >1),[Distinct Counts])

 

distinct count can behave differently based on group by

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.