Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a column with duplicate dates. I need to calculate date difference based on another column.
For example, I have Stage column with 1,2,3... repeated values . What will be function I can use to calculate date values differences for stage 1?
Thanks in Advance..
Solved! Go to Solution.
maybe you can try this
measure=calculate(max(lastdate),allexcept(table,bomno))-calculate(min(lastdate),allexcept(table,bomno))
Proud to be a Super User!
Hi all,
please help me. I need to calculate the sum of several date time differences by different values (Case ID status code changes and it has date and time). It is complicated to explain, so please look there:
Can anyone help? thanks in advance.
Thanks for your answers...
Days Diff Measure : =
VAR ranking =
RANKX (
FILTER ( ALL ( 'Table' ), 'Table'[Stage] = MAX ( 'Table'[Stage] ) ),
CALCULATE ( MAX ( 'Table'[Date] ) ),
,
ASC
)
VAR result =
DATEDIFF (
CALCULATE (
MAX ( 'Table'[Date] ),
FILTER (
ALL ( 'Table' ),
'Table'[Stage] = MAX ( 'Table'[Stage] )
&& RANKX (
FILTER ( ALL ( 'Table' ), 'Table'[Stage] = MAX ( 'Table'[Stage] ) ),
CALCULATE ( MAX ( 'Table'[Date] ) ),
,
ASC
) = ranking - 1
)
),
MAX ( 'Table'[Date] ),
DAY
)
RETURN
result
https://www.dropbox.com/s/rwbkhoz3ir6d789/erp.pbix?dl=0
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
pls provide some sample data and expected output.
Proud to be a Super User!
My sample data
So, I need days difference between first date and last date (in lastdate Column) based on bomno column.
Thanks in advance..
maybe you can try this
measure=calculate(max(lastdate),allexcept(table,bomno))-calculate(min(lastdate),allexcept(table,bomno))
Proud to be a Super User!
Need DAX(Power BI) for no of days for Each SGNo from the Above Table.
what's the expected output? it's better to create a new postand provide the detailed info.
Proud to be a Super User!
Thanks a lot. It worked for me...😊
you are welcome
Proud to be a Super User!
User | Count |
---|---|
98 | |
87 | |
77 | |
67 | |
63 |
User | Count |
---|---|
110 | |
95 | |
95 | |
64 | |
58 |