Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hello,
Below is my current measure that displays the cumulative CheckFeatures by WeekStartingDate. It works correctly when no additional filters are applied:
CumulativeCheckFeatures =
VAR CurrentWeekEndSK =
CALCULATE(
MAX(DatesTable[DateSK]),
DatesTable[WeekStartingDate] = MAX(DatesTable[WeekStartingDate])
)
RETURN
CALCULATE(
SUM(Features[CheckFeatures]),
FILTER(
ALL(Features),
Features[CreatedDateSK] <= CurrentWeekEndSK
)
)
However, when I apply an AreaSK filter (for example, filtering to AAAA), the chart does not display the expected values. With the AAAA filter, the chart currently shows one column on January 26, 2025, with a value of 15; the X-axis then lists February 09 and February 23 with no columns; followed by a column on March 09, 2025 with a value of 22.
For your reference, here is some sample data from our DatesTable:
Other work items have a CheckFeatures value of 0, so they should not affect the chart. I use CreatedDateSK to map with DateSK.
Could you please help me update the script so that when I apply the AAAA filter, the cumulative values display as follows on the X-axis:
Thank you very much for your help.
Hi @yzhouMC ,
Did the above suggestions help with your scenario? if that is the case, you can consider Kudo or Accept the helpful suggestions to help others who faced similar requirements.
If these also don't help, please share more detailed information and description to help us clarify your scenario to test.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
anexa o arquivo
Sorry, do you want me to attach the file ? I can post some pictures, if it helps you understand the issue.
Thanks.
Hiii @yzhouMC
Your current measure uses ALL(Features), which ignores any filters applied (including AreaSK). To ensure the measure respects the AreaSK filter, modify it as follows:
CumulativeCheckFeatures =
VAR CurrentWeekEndSK =
CALCULATE(
MAX(DatesTable[DateSK]),
DatesTable[WeekStartingDate] = MAX(DatesTable[WeekStartingDate])
)
RETURN
CALCULATE(
SUM(Features[CheckFeatures]),
FILTER(
ALLSELECTED(Features), -- Changed from ALL(Features) to ALLSELECTED(Features)
Features[CreatedDateSK] <= CurrentWeekEndSK
)
)
If this helps, I would appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!
Thanks for your help. Unfortunately chage from ALL(Features) to ALLSELECTED(Features) does not help. Any other suggestions ?
Hiiii @yzhouMC
Please try this
CumulativeCheckFeatures =
VAR CurrentWeekEndSK =
CALCULATE(
MAX(DatesTable[DateSK]),
DatesTable[WeekStartingDate] = MAX(DatesTable[WeekStartingDate])
)
RETURN
CALCULATE(
SUM(Features[CheckFeatures]),
FILTER(
ALLSELECTED(DatesTable),
DatesTable[DateSK] <= CurrentWeekEndSK
),
FILTER(
ALLSELECTED(Features),
Features[CreatedDateSK] <= CurrentWeekEndSK
)
)
If this helps, I would appreciate your KUDOS!
Did I answer your question? Mark my post as a solution!
Check out the March 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
92 | |
66 | |
56 | |
46 | |
45 |