Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I have the following problem that I can't quite find a solution for. I'm trying to filter a stacked bar chart to the latest complete date in my data.
The latest complete date is defined in my data as a date that has prices entered from at least two different sources.
This part seems to be working.
Solved! Go to Solution.
Hi, @aggss
Based on your information, I create sample tables:
Price table:
Date table:
Then create new measures:
LastCompleteWk =
CALCULATE(
MAX('Date'[Date]),
FILTER(
ALL('Date'),
CALCULATE(
DISTINCTCOUNT('Price'[Source]),
ALLEXCEPT('Price', 'Price'[Date], 'Price'[Product])
) >= 2
)
)
AvgPriceLastWk =
CALCULATE(
AVERAGE('Price'[Price]),
FILTER(
VALUES('Date'),
'Date'[Date] = [LastCompleteWk]
)
)
Put them in visual, here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @aggss
Based on your information, I create sample tables:
Price table:
Date table:
Then create new measures:
LastCompleteWk =
CALCULATE(
MAX('Date'[Date]),
FILTER(
ALL('Date'),
CALCULATE(
DISTINCTCOUNT('Price'[Source]),
ALLEXCEPT('Price', 'Price'[Date], 'Price'[Product])
) >= 2
)
)
AvgPriceLastWk =
CALCULATE(
AVERAGE('Price'[Price]),
FILTER(
VALUES('Date'),
'Date'[Date] = [LastCompleteWk]
)
)
Put them in visual, here is my preview:
How to Get Your Question Answered Quickly
Best Regards
Yongkang Hua
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
User | Count |
---|---|
98 | |
76 | |
75 | |
49 | |
27 |