March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi All,
I have a measure in which I have positive and negative values which is achieved after perfroming a difference in 2 already existing measures. I want to add them separately and then take the percentage accordingly.
Please refer to the sample below:
TIA
Solved! Go to Solution.
Hi @singh_gagan30 ,
You can try this measure
Share % =
var negativesum = IF ([Measure 4] < 0 ,CALCULATE(SUMX(FILTER(ALL('Table'),[Measure 4]<0),[Measure 4])))
var Positivesum = IF ([Measure 4] > 0 ,CALCULATE(SUMX(FILTER(ALL('Table'),[Measure 4]>0),[Measure 4])))
RETURN
If ([Measure 4] > 0 , DIVIDE([Measure 4],Positivesum), DIVIDE([Measure 4],negativesum))
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
Hi @singh_gagan30 ,
You can try this measure
Share % =
var negativesum = IF ([Measure 4] < 0 ,CALCULATE(SUMX(FILTER(ALL('Table'),[Measure 4]<0),[Measure 4])))
var Positivesum = IF ([Measure 4] > 0 ,CALCULATE(SUMX(FILTER(ALL('Table'),[Measure 4]>0),[Measure 4])))
RETURN
If ([Measure 4] > 0 , DIVIDE([Measure 4],Positivesum), DIVIDE([Measure 4],negativesum))
Regards,
Harsh Nathani
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
@singh_gagan30 , formula for share %. Can you share sample data and sample output in table format?
Hi @singh_gagan30 ,
Can you please specify, how you achieve this percentage value in "% share" column?
Your comments column doesn't make sense.
Write a proper example with values you are using to calculate the percentage.
Thanks,
Pragati
I added all the negative values and a denominator and numerator is row wise. for negative values i divided the negative row values to the dnominator and similary process for the positive values.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
91 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
73 | |
68 |