Forum Discussion
Calculate Max date by filter two columns
- 5 years ago
Hi, Saxon10
Please check the below-updated link that includes the calculated column.
https://www.dropbox.com/s/hjra12fkfkixrvl/saxon10.pbix?dl=0
Max Date new column =
VAR countriescondition =
SUMMARIZE ( FILTER ( Data, Data[ITEM] = Report[ITEM] ), Data[COUNTRY] )
VAR newtable =
FILTER (
Data,
Data[ITEM] = Report[ITEM]
&& Data[COUNTRY]
IN { "INDIA", "US", "UK", "NEWL" }
&& Data[AREA CODE] IN { "A" }
)
RETURN
IF (
COUNTROWS ( countriescondition ) >= 4,
MAXX ( newtable, Data[DATE] ),
BLANK ()
)If you write calculated measure, the table visualization already has the filter for the item, so I did not mention the item column in the calculated measure.
However, as you can see in the calculated column, I had to mention the item column.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Hi, Saxon10
Please check the below-updated link that includes the calculated column.
https://www.dropbox.com/s/hjra12fkfkixrvl/saxon10.pbix?dl=0
Max Date new column =
VAR countriescondition =
SUMMARIZE ( FILTER ( Data, Data[ITEM] = Report[ITEM] ), Data[COUNTRY] )
VAR newtable =
FILTER (
Data,
Data[ITEM] = Report[ITEM]
&& Data[COUNTRY]
IN { "INDIA", "US", "UK", "NEWL" }
&& Data[AREA CODE] IN { "A" }
)
RETURN
IF (
COUNTROWS ( countriescondition ) >= 4,
MAXX ( newtable, Data[DATE] ),
BLANK ()
)
If you write calculated measure, the table visualization already has the filter for the item, so I did not mention the item column in the calculated measure.
However, as you can see in the calculated column, I had to mention the item column.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Thanks for your reply and help. Your solution working well.