Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register 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...
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
87 | |
85 | |
82 | |
66 | |
49 |
User | Count |
---|---|
137 | |
111 | |
101 | |
66 | |
65 |