Forum Discussion
Joshi_AB7071
3 years agoRegular Visitor
DAX flag for Last Completed Quarter
Hello DAX guru's I'm trying to create a filter in the DimDate table , which would put the flag as True when the data is in last completed Quarter. In my dashboard Fiscal Year starts from Octobe...
- Anonymous3 years ago
Hi Joshi_AB7071 ,
I created a sample file(see the attachment) base on your provided sample data, please check that is what you want. You can create two calculated columns as below to get it:
Fiscal Year Quarter = 'Table'[FY] & IF ( 'Table'[Month] IN { "Oct", "Nov", "Dec" }, "Q1", IF ( 'Table'[Month] IN { "Jan", "Feb", "Mar" }, "Q2", IF ( 'Table'[Month] IN { "Apr", "May", "Jun" }, "Q3", "Q4" ) ) )Flag = VAR _count = CALCULATE ( COUNT ( 'Table'[Fiscal Year Quarter] ), FILTER ( 'Table', 'Table'[Fiscal Year Quarter] = EARLIER ( 'Table'[Fiscal Year Quarter] ) && 'Table'[Amount] > 0 ) ) RETURN IF ( _count = 3, "True", "False" )Best Regards
Anonymous
3 years agoNot applicable
Hi Joshi_AB7071 ,
I created a sample file(see the attachment) base on your provided sample data, please check that is what you want. You can create two calculated columns as below to get it:
Fiscal Year Quarter =
'Table'[FY]
& IF (
'Table'[Month] IN { "Oct", "Nov", "Dec" },
"Q1",
IF (
'Table'[Month] IN { "Jan", "Feb", "Mar" },
"Q2",
IF ( 'Table'[Month] IN { "Apr", "May", "Jun" }, "Q3", "Q4" )
)
)Flag =
VAR _count =
CALCULATE (
COUNT ( 'Table'[Fiscal Year Quarter] ),
FILTER (
'Table',
'Table'[Fiscal Year Quarter] = EARLIER ( 'Table'[Fiscal Year Quarter] )
&& 'Table'[Amount] > 0
)
)
RETURN
IF ( _count = 3, "True", "False" )
Best Regards
Joshi_AB7071
3 years agoRegular Visitor
Thanks for your time. its worked .
Thanks,
A Joshi