Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I am struggling to find the correct dax expression for this. i have a date column which is used as a filter in the dashboard. then i have another column (deadline date) as part of the data. I wanted to create a column/measure that would give me the difference between whatever date is filtered and the deadline date.
so for example, i filtered to Nov 10, and project 1 is due on Nov 30, the measure/column would give me 20 days as a result.
the intention is to group the projects that are due in the next weeks/months using bucks/bins. any help?
Solved! Go to Solution.
Hi @tropic,
Taking into acount that you are using a slicer to filter your dashboard you need to create a measure, or different metrics depending on the bin.
The basic calculation will be something similar to this:
Days difference =
VAR _TempTable =
ADDCOLUMNS (
Table,
"_DaysDifference", DATEDIFF ( Table[DeadlineDates], MAX ( SlicerTable[DateColumn] ), DAY )
)
RETURN
MAXX ( _TempTable, [_DaysDifference] )
This will give you the value per each line of your table of the difference then you need to calculate the buckets, this can be done using a table with the values of the bins.
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @tropic,
Taking into acount that you are using a slicer to filter your dashboard you need to create a measure, or different metrics depending on the bin.
The basic calculation will be something similar to this:
Days difference =
VAR _TempTable =
ADDCOLUMNS (
Table,
"_DaysDifference", DATEDIFF ( Table[DeadlineDates], MAX ( SlicerTable[DateColumn] ), DAY )
)
RETURN
MAXX ( _TempTable, [_DaysDifference] )
This will give you the value per each line of your table of the difference then you need to calculate the buckets, this can be done using a table with the values of the bins.
Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.
If the information is sensitive please share it trough private message.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThis is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
84 | |
72 | |
68 | |
41 | |
35 |
User | Count |
---|---|
108 | |
56 | |
52 | |
48 | |
41 |