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
Anonymous
Not applicable

Subtraction each Category

Hi Team,

 

Remaining Stock calculation wrong, I need to subtract Prod_Total 2 based on each "UID in Stock" row wise,
Note: UID in Stock, Prod Total 2 both are new measures values, 
UID in Stock = [x]*[y]
Prod Total 2 = CALCULATE([Prod_Total],ALLEXCEPT('Table','Table'[UID]))
Remaining Stock = ? (nee your help)

screen.PNG

KV's

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , ALLEXCEPT means that filter will taken all other will be ingonred

Try

Total Prod Val = CALCULATE([Prod_Val],ALLEXCEPT('Table','Table'[Month Year]))

 

refer: https://www.sqlbi.com/articles/using-allexcept-versus-all-and-values/

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Anonymous , ALLEXCEPT means that filter will taken all other will be ingonred

Try

Total Prod Val = CALCULATE([Prod_Val],ALLEXCEPT('Table','Table'[Month Year]))

 

refer: https://www.sqlbi.com/articles/using-allexcept-versus-all-and-values/

Anonymous
Not applicable

Hi @amitchandak ,

 

Thanks for the soluction,

How do I split sum UID wise like 44.OIU and 67 RTY
screen.PNG

amitchandak
Super User
Super User

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Anonymous
Not applicable

Hi @amitchandak ,

 

Prod_Val = SUM('UID'[Production])*1.1
Prod_Stock = SUM('UID'[Stock])*1.2
Total Prod Val = CALCULATE([Prod_Val],ALLEXCEPT('UID','UID'[UID]))

 

Data look like below and date slicer selected Jan month but Total Prod val showing overall UID sum, but I'm expected Jan month sum .

 

screen.PNGscreen_II.PNG

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.