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
dsittrop
New Member

Level of Detail Expression

Hi All,

 

I ave the following table:

dsittrop_0-1619833126580.png

I would like to see the sum of 'Candidate_First Pref_Votes_ByLocation' by 'Party_Id' only. I.e. the value if 'HOR_Candidate_id' was taken out of the table.

 

I have looked at other posts about DAX expressions, however still have not been successful.

 

Update: I think I may have solved it:

Total Votes of party = CALCULATE(SUM('Dashboard 1'[Candidate_First Pref_Votes_ByLocation]),ALLEXCEPT('Dashboard 1','Dashboard 1'[Party_Id]))
Does that look correct?
1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Remove HOR_Candidate_ID from the visual and drag this measure

=SUM('Dashboard 1'[Candidate_First Pref_Votes_ByLocation])

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Remove HOR_Candidate_ID from the visual and drag this measure

=SUM('Dashboard 1'[Candidate_First Pref_Votes_ByLocation])

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@dsittrop , Which LOD, in case your are referring to Tableau

all expect means only that filter will work

 

Try

CALCULATE(SUMX(values('Dashboard 1'[Party_Id]),'Dashboard 1'[Candidate_First Pref_Votes_ByLocation]))

 

or

 

CALCULATE(SUMX(values('Dashboard 1'[Party_Id]),calc(sum('Dashboard 1'[Candidate_First Pref_Votes_ByLocation]))))

 

refer

Tableau Fixed Level of Details in Power BI- Tableau Vs Power BI- Chapter 6- LOD- FIXED (Level of Details): https://youtu.be/QdnOHcZqkPU

 

LOD Include (Level Of Details): https://youtu.be/nmBVc2fN6aU

 

LOD exclude (Level of Details): https://youtu.be/wJEjG3O3vrk

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.