Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
I have to add a column QTR_FLAG in the table. Our FY starts in April.
So, in a table(below) max YrMo will always be a previous month not a current Month.
- If max year YrMo is 201809, then I want to Flag column QTR_FLAG 201809, 201808, and 201807 = 1 all other rows = 0
- If max year YrMo is 201811, then I want to Flag QTR_FLAG 201811 and 201810 = 1 all other rows = 0
So in a nuttshell, only current Fiscal Quarter will have value = 1 all other will be 0s
Thanks is advance
Solved! Go to Solution.
Should be something like this if i understand correctrly:
VAR RefDate = TODAY() VAR YrMoReference = YEAR( EOMONTH( RefDate, -1 ) ) * 100 + MONTH( EOMONTH( RefDate, -1 ) ) VAR QtrReference = CALCULATE( MIN( Dates[qtr] ), ALL( Dates ), Dates[YrMo] = YrMoReference ) VAR FYReference = CALCULATE( MIN( Dates[fy] ), ALL( Dates ), Dates[YrMo] = YrMoReference ) RETURN IF( Dates[FY] = FYReference && Dates[QTR] = QtrReference, 1, 0 )
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Should be something like this if i understand correctrly:
VAR RefDate = TODAY() VAR YrMoReference = YEAR( EOMONTH( RefDate, -1 ) ) * 100 + MONTH( EOMONTH( RefDate, -1 ) ) VAR QtrReference = CALCULATE( MIN( Dates[qtr] ), ALL( Dates ), Dates[YrMo] = YrMoReference ) VAR FYReference = CALCULATE( MIN( Dates[fy] ), ALL( Dates ), Dates[YrMo] = YrMoReference ) RETURN IF( Dates[FY] = FYReference && Dates[QTR] = QtrReference, 1, 0 )
Did I answer your question correctly? Mark my answer as a solution!
Proud to be a Datanaut!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
80 | |
63 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |