Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
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...
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
6 | |
1 | |
1 | |
1 | |
1 |