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 August 31st. Request your voucher.
Hi,
I've created the following table using measures; however, when I'm getting to a column that needs to ignore the page filter for period, then filter as per the measure (less or equal to period on the filter), it is bringing back the correct total value YTD, but it's putting the total in each cell rather than splitting as per the service line categories.
The measure I'm using is as follows:
How can I get it to split as per the categories?
Solved! Go to Solution.
hi @ConnorCrawford - can you try the below formaule :
Revenue YTD =
CALCULATE(
[Margin],
REMOVEFILTERS('Date'),
FILTER(
ALL('Date'),
'Date'[Period] <= SELECTEDVALUE('Date'[Period])
),
Actuals[PL Type] = "Revenue"
)
Proud to be a Super User! | |
Hi @ConnorCrawford ,
The issue is that you're removing all filters ALL(), which includes the Service Line category so your calculation ignores that and just shows the total across everything.
Please try to update your DAX to look like this:
Revenue YTD =
CALCULATE(
[Margin],
REMOVEFILTERS('Date'),
FILTER(
ALL('Date'),
'Date'[Period] <= SELECTEDVALUE('Date'[Period])
),
Actuals[PL Type] = "Revenue"
)
Let me know if this help you
hi @ConnorCrawford - can you try the below formaule :
Revenue YTD =
CALCULATE(
[Margin],
REMOVEFILTERS('Date'),
FILTER(
ALL('Date'),
'Date'[Period] <= SELECTEDVALUE('Date'[Period])
),
Actuals[PL Type] = "Revenue"
)
Proud to be a Super User! | |
This worked - thank you!
To fix this, you need to modify the REVENUE YTD measure to preserve the Service Line filter context while still applying the Date[Period] filter. You can achieve this by using KEEPFILTERS or adjusting the filter context in the CALCULATE function.
Here’s the corrected DAX measure:
REVENUE YTD =
CALCULATE(
[Margin],
KEEPFILTERS(Actuals[PL Type] = "Revenue"),
Date[Period] <= SELECTEDVALUE(Date[Period])
)
After applying this updated measure, the REVENUE YTD column in your table should split the values by Service Line instead of showing the total in every cell. For example:
This solution should resolve the issue and give you the correct YTD revenue split by Service Line. Let me know if you need further clarification!