Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi,
The below is the Excel Formula Now I want to convert into DAX Calculated column. Please Suggest on this one
IF [ "Date1" - MAX ( "Date2";" Date1";" Date3";"Date4") ] > 1 THEN "0" ELSE "1" |
Thanks
Hi @Anonymous
please try
=
VAR Date1 = [Date1]
VAR T1 =
GENERATESERIES ( 1, 4, 1 )
VAR T2 =
ADDCOLUMNS (
T1,
"@Date", SWITCH ( [Value], 1, [Date1], 2, [Date2], 3, [Date3], 4, [Date4] )
)
VAR MaxDate =
MAXX ( T2, [@Date] )
RETURN
IF ( DATEDIFF ( MaxDate, Date1, DAY ) > 1, 1, 0 )
Hi Tamerj1,
When I am adding the above Dax Calculation in a new measure I am not able to get the Table and column name date1. any suggetions Please
Hi @Anonymous
For measure please try
=
VAR Date1 = [Date1]
VAR T1 =
GENERATESERIES ( 1, 4, 1 )
VAR T2 =
ADDCOLUMNS (
T1,
"@Date",
SWITCH (
[Value],
1, MAX ( [Date1] ),
2, MAX ( [Date2] ),
3, MAX ( [Date3] ),
4, MAX ( [Date4] )
)
)
VAR MaxDate =
MAXX ( T2, [@Date] )
RETURN
IF ( DATEDIFF ( MaxDate, Date1, DAY ) > 1, 1, 0 )
User | Count |
---|---|
12 | |
12 | |
8 | |
8 | |
6 |
User | Count |
---|---|
27 | |
19 | |
13 | |
11 | |
7 |