The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I need to get a calculation to get the sum of total auths by month. Should I do this in the transformations or in the Reporting functionality via Dax Formula?
Solved! Go to Solution.
Hi @Anonymous ,
You can create a calculated column or measure to get it using below formulas:
Calculated column:
Auth Fees By Month =
SUMX (
FILTER (
'Monthly Billing Archive',
'Monthly Billing Archive'[Billing / Revenue Recognition Term]
= EARLIER ( 'Monthly Billing Archive'[Billing / Revenue Recognition Term] )
),
'Monthly Billing Archive'[Auth Fees]
)
Or
Measure:
Auth Fees By Month =
SUMX (
FILTER (
ALLSELECTED ( 'Monthly Billing Archive' ),
'Monthly Billing Archive'[Billing / Revenue Recognition Term]
= SELECTEDVALUE ( 'Monthly Billing Archive'[Billing / Revenue Recognition Term] )
),
'Monthly Billing Archive'[Auth Fees]
)
Best Regards
hi, @Anonymous
you can do it in DAX
Thanks Dangar332, Can you give an example?
Hi, @Anonymous
Try below measure
Measure =
Sumx (
Filter ( tablename, tablename[month column]=earlier(tablename[month column])),
Sum(tablename[authscolumn]))
This was very helpful, but having an error. Can you tell what I am doing wrong? The "earlier" function does not seem to want to accept the same table name as the sum/filter function.
Hi @Anonymous ,
You can create a calculated column or measure to get it using below formulas:
Calculated column:
Auth Fees By Month =
SUMX (
FILTER (
'Monthly Billing Archive',
'Monthly Billing Archive'[Billing / Revenue Recognition Term]
= EARLIER ( 'Monthly Billing Archive'[Billing / Revenue Recognition Term] )
),
'Monthly Billing Archive'[Auth Fees]
)
Or
Measure:
Auth Fees By Month =
SUMX (
FILTER (
ALLSELECTED ( 'Monthly Billing Archive' ),
'Monthly Billing Archive'[Billing / Revenue Recognition Term]
= SELECTEDVALUE ( 'Monthly Billing Archive'[Billing / Revenue Recognition Term] )
),
'Monthly Billing Archive'[Auth Fees]
)
Best Regards
Hi, @Anonymous
Sumx (
Filter ( tablename, tablename[month column]=max(tablename[month column])),
Sum(tablename[authscolumn]))
User | Count |
---|---|
15 | |
13 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
19 | |
12 | |
9 | |
5 |