Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am facing a problem. I am working on a contracts dashboard. For this I am using 2 dates. One date is the end date of the contract, the other date is when a contract should be renewed. Now I managed to get both dates in a bar chart with the userelationship formula in dax.
The only problem is that the table that comes with it does not filter with it, when I select the renewal date. It uses the active relation between date and Enddate.
In my bar chart I want to be able to click on both dates and the table will change with the clicked date. One time the end date, the other time the renewal date.
Hopefully you can help me!
This is the data I used:
I used this table:
end date | renewal date | contract number |
6/30/2024 | 6/1/2024 | A1 |
7/14/2024 | 6/14/2024 | A2 |
6/20/2024 | 6/1/2024 | A3 |
7/30/2024 | 7/3/2024 | A4 |
7/4/2024 | 7/3/2024 | A5 |
7/30/2024 | 6/30/2024 | A6 |
And this query for a date table (you can paste this in Advanced editor):
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("dY5LCsAwCAXv4jqQ56fp2nOI979GidA2pWQ5MswzghQdowvEqBF4AWfKFsTWcd63Ca8gJci+oCXMiacAXcCtBNhWOP6Fz8c+KPMC", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"End date" = _t, #"Renewal date" = _t, #"Contract number" = _t]),
#"Changed Type with Locale" = Table.TransformColumnTypes(Source, {{"End date", type date}}, "en-GB"),
#"Changed Type with Locale1" = Table.TransformColumnTypes(#"Changed Type with Locale", {{"Renewal date", type date}}, "en-GB")
in
#"Changed Type with Locale1"
After that I made a relation between 'date' and 'end date'.
After that I made a measure like this:
Solved! Go to Solution.
HI @José2410,
According to your description and sample data, it seems like a common multiple date fields analysis requirement.
For this scenario, I'd like to suggest you take a look at Greg’s blog to know how to handle with date range analysis requirement.
Before You Post, Read This: start, end date
Regards,
Xiaoxin Sheng
HI @José2410,
According to your description and sample data, it seems like a common multiple date fields analysis requirement.
For this scenario, I'd like to suggest you take a look at Greg’s blog to know how to handle with date range analysis requirement.
Before You Post, Read This: start, end date
Regards,
Xiaoxin Sheng
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to 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...
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |