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.
hoping this is pretty simple... I have a dax measure that is supposed to supply the last fiscal period if nothing is selected, the problem is it just shows blank unless the fiscal period is in the visual either as an axis or a filter. I just want the card to show total revenue.
Total_Revenue = var FYPeriod = SELECTEDVALUE('Acct Period'[FiscalYearPeriod], LASTNONBLANK('Acct Period'[FiscalYearPeriod], SUM('Proj Detail'[YTDIncurredAmount])))
Return
CALCULATE(SUM('Proj Detail'[YTDIncurredAmount]), 'Proj Detail'[RateType] <> "Actuals", 'CNPAccount'[SummaryCategory] = "Revenue" || 'CNPAccount'[SummaryCategory] ="Revenue Adjustment",'Acct Period'[FiscalYearPeriod] = FYPeriod)
-- You should create a measure first (name it something sensible, not Measure): [Measure] = SUM ( 'Proj Detail'[YTDIncurredAmount] ) -- Then try this (measures and columns exposed in reports should not have underscores in their names): [Total Revenue] = VAR FYPeriod = if( HASONEVALUE( 'Acct Period'[FiscalYearPeriod] ), VALUES ( 'Acct Period'[FiscalYearPeriod] ), LASTNONBLANK ( 'Acct Period'[FiscalYearPeriod], [Measure] ) ) RETURN CALCULATE ( [Measure], 'Proj Detail'[RateType] <> "Actuals", TREATAS( { "Revenue", "Revenue Adjustment" }, 'CNPAccount'[SummaryCategory] ), 'Acct Period'[FiscalYearPeriod] = FYPeriod )
The above might or might not work. This depends on the logic you want but since I can't know what you want, I'm giving you what I guess could work in your case. Bear in mind that boolean filters in CALCULATE overwrite filters coming from outside.
Best
Darek
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 |
---|---|
43 | |
23 | |
21 | |
15 | |
15 |
User | Count |
---|---|
45 | |
31 | |
30 | |
18 | |
17 |