Forum Discussion
Total two rows for a measure
- Anonymous4 years ago
Hi mohsenask ,
You could use SUMX() function to get the sum of measure.
For example:
Measure 4 = SUMX(ALL('Table'),[Measure 3])Best Regards,
Jay
mohsenask , I think these should work
MS_GROSS = sum(All_Payouts[gross])
MS_BillingAmt = (sum((All_Fees[billing_amount])))
MS_%_Applied = [MS_BillingAmt]/[MS_GROSS]
Then you can have a measure
if([MS_%_Applied ] >.0205 , "Premium", "Not Premium")
In case you need that as a filter explore bucketing
Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1387187#M626
Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k
- mohsenask4 years ago
Helper II
Hi amitchandak - i have those measures but MS_%_Applied is actually calculating the individual % for the fee_category
I want to calculate the % Applied = (% Applied of BillingAmt) + (% Applied of Gross) i.e. 3.08+0.11= 3.19 into another column?? or where?
So the % applied = 3.19 (for both network_fee and stripe_fee)
Then the measure if([MS_%_Applied ] >.0205 , "Premium", "Not Premium") can be created.
- mohsenask4 years ago
Helper II
amitchandak
To make myself clearer, these are two records for ONE charge ID. So one unique ID has two records. I want to calculate the total of the MS_%Applied for the two records for each charge_ID. There could be more rows for each charge ID too- mohsenask4 years ago
Helper II
Need to identify whether premium or not based on the total of MS_%_Applied for the two rows that belong to ONE charge_ID
- amitchandak4 years ago
Super User
mohsenask , You can not have column now you can measure
Both should be measure
M1 =
[% Applied of BillingAmt] + [% Applied of Gross]
Or
AverageX(values(Table[Charge id]) ,[% Applied of BillingAmt] + [% Applied of Gross] )
- mohsenask4 years ago
Helper II
M1 =
[% Applied of BillingAmt] + [% Applied of Gross]
are these two new measures to create and then sum them into M1 ?