March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
Calculate difference between:
Baseline “Planned end date” (Planned end date from the earliest month selected in snapshot slicer) and Planned End date from the last month selected in the snapshot slicer per project.
In the above selection it would be a measure calculating the DateDiff between “May” and “Current”(October) which in row 1 corresponds to 2/17/2022 and 12/8/2022 which should equal 294 days delay.
If I Change the slicer from Current to June it should be 2/17/2022 and 2/17/2022 which should equal 0.
Let me know if I need to elaborate further
Solved! Go to Solution.
Hi @Siboska
I'm not on my computer right now, but I can advise you the following.
Since you are using a matrix visual then you can utilize the totals column to disply the required result.
=
IF (
ISINSCOPE ( Peojects[Snapshot Name] ),
SELECTEDVALUE ( Projects[Planned EndDate] ),
DATEDIFF (
MIN ( Projects[Planned EndDate] ),
MAX ( Projects[Planned EndDate] ),
DAY
)
)
Activate the column totals and rename it then use this measure in the matrix
Hi @Siboska
the slicer from which table/column?
do you have a date table? Does it contain a YYYYMM format column?
I guess the Planned EndDate column is MAX or MIN aggregated in the matrix. Is that correct?
What is the name of the table that contains the Planned EndDate column?
I have tried to map everything out and make the context better:
The data model contains of 2 tables. Projects and Snap shots
Hi @Siboska
The snapshot name used in the slicer and the matrix from which table? Any relationship between the two tables? Is it a real date or text data type?
Hi,
There is a One- to many relationship from Table: SnapShot --> Project.
It is real dates
Hi @Siboska
I'm not on my computer right now, but I can advise you the following.
Since you are using a matrix visual then you can utilize the totals column to disply the required result.
=
IF (
ISINSCOPE ( Peojects[Snapshot Name] ),
SELECTEDVALUE ( Projects[Planned EndDate] ),
DATEDIFF (
MIN ( Projects[Planned EndDate] ),
MAX ( Projects[Planned EndDate] ),
DAY
)
)
Activate the column totals and rename it then use this measure in the matrix
Hi @Siboska,
Does something similar to the below get you to what you need?
Unfourtntly not.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
16 | |
15 | |
7 | |
6 |
User | Count |
---|---|
33 | |
29 | |
16 | |
13 | |
12 |