Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi There,
I am trying to create a calculated meaure where i am going subtraction from two columns which contains values as below :
I need the result value which is showing in green(2) however when i am doing subtraction from (Ask-Actual) i am getting a result (-1) however i want to ignore negative values in my measure so that my result value will appear as (2).
I have created 3 measures which are as below :
Total_Ask=Sum(ask)
Total Actual-Sum(Actual)
Gap=Total Ask-Total Actual
Can anyone please help me in figuring out how can i calculate Gap while ignoring Negative values?
Regards,
Ashish
Solved! Go to Solution.
@Anonymous , of those, are column
sumx(table, if([Total Ask]-[Total Actual]>0 ,[Total Ask]-[Total Actual], blank()) )
Hi @Anonymous ,
Please check the formula.
measure1 = SUM('Table'[ask])-SUM('Table'[actual])
Measure2 = IF([measure1]<0,0,[measure1])
Measure3 = IF(ISINSCOPE('Table'[ask]),[measure1],SUMX(ALL('Table'),[Measure2]))
Best Regards,
Jay
Hi @Anonymous ,
Please check the formula.
measure1 = SUM('Table'[ask])-SUM('Table'[actual])
Measure2 = IF([measure1]<0,0,[measure1])
Measure3 = IF(ISINSCOPE('Table'[ask]),[measure1],SUMX(ALL('Table'),[Measure2]))
Best Regards,
Jay
User | Count |
---|---|
25 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
25 | |
12 | |
11 | |
10 | |
6 |