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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
kavimk
Frequent Visitor

Incorrect total in measure

 

Sales = If (amt <0, amt+5, amt-5)
result:

Geo      amt     sales

India     15     10

japan   -10   -5

total      5     0 

here grant total is incorrect
expected O/P

1. we have to fix the incorrect total
2. it should work whatever user selecting any limit not limited one it could be multiple fields also instead of Geo

 

1 ACCEPTED SOLUTION
4 REPLIES 4
Daniel29195
Super User
Super User

@kavimk 

 

your measure -->  Sales = If (amt <0, amt+5, amt-5)

 

 

now create a new measure also : 

additive sales =  sumx(values(tbl_name[col_name]), [Sales])

 

 

let me know if it works for you .

 

 

If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

 

this will be work but i want this part dynamically "values(tbl_name[col_name]". user wants to select any field 

 

@kavimk 

this video will help you with your problem .

 

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.