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.
Hi Team,
DAX function for subtract total value -limt and remaining value reflect all size rows like z1 (26.9-9.8 and remaining value 17.1) see output table
Below table is output file (after subtrating data for total size -Limit )
Remaining Val is (ex. z1 is 26.9 subtract with limit (z1 - 9.8) and remaining value reflect all z1 rows)
Thanks,
KV's
Solved! Go to Solution.
@Anonymous , Try a new column like
sumx(filter(table, [size] = earlier([size]) ),[Qas(m)]) - maxx(filter(table, [size] = earlier([size]) ),[Limit])
or a measure like
sumx(filter(allselected(table), [size] = max([size]) ),[Qas(m)]) - maxx(filter(allselected(table), [size] = max([size]) ),[Limit])
Hi @Anonymous ,
There are two ways:
Here are the steps you can follow:
The first method:
1. Create measure.
Remaining Val =
var _1=CALCULATE(SUM('Table'[Qas]),FILTER(ALL('Table'),'Table'[size]=MAX('Table'[size])))
var _2=CALCULATE(MAX('Table'[Limit]),FILTER(ALL('Table'),'Table'[size]=MAX('Table'[size])))
return _1 -_2
2. Result.
The second method:
1. Create Calculated table.
table1 =
SUMMARIZE('Table','Table'[size],
'Table'[Desc],
"Limit",CALCULATE(MAX('Table'[Limit])),
"Remaining Val",CALCULATE(SUM('Table'[Qas]),FILTER(ALL('Table'),'Table'[size]=MAX('Table'[size])))-CALCULATE(MAX('Table'[Limit]),FILTER(ALL('Table'),'Table'[size]=MAX('Table'[size]))))
2. Result.
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , Try a new column like
sumx(filter(table, [size] = earlier([size]) ),[Qas(m)]) - maxx(filter(table, [size] = earlier([size]) ),[Limit])
or a measure like
sumx(filter(allselected(table), [size] = max([size]) ),[Qas(m)]) - maxx(filter(allselected(table), [size] = max([size]) ),[Limit])
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
96 | |
79 | |
67 | |
62 |
User | Count |
---|---|
137 | |
106 | |
104 | |
81 | |
63 |