Forum Discussion
IF ELSE in DAX Measure using only Dimensions causes error
Hi Team
I am working on a report connected to a Power BI dataset.
I am building a Table visual,I am using one fact from Fact Table and there are other dimension values coming from different dimension tables.
There are 2 dates coming from 2 different dimesnions (in the table visual). I am trying to compare if Dim1.Date < Dim2.Date then give 1 else 0.
I have written 2 measures to get the 2 dates
DateFrom Dim1 =
3 Replies
- AnonymousNot applicable
Hello Anonymous
I've created the same measure and tried but it works fine.
Can you share some data and visuals where you're using the above measures?- AnonymousNot applicable
Hi Anonymous
I cannot share data since its company specific and also is a Live connection to a Power BI dataset.
Along with the 2 dates from 2 dimension tables and these 3 measures there are other dimensions getting used in the Table visual.
- amitchandak
Super User
Anonymous , if Dim1 and dim2 are joined these two should work
MAXX(allselected('Dim1'),'Dim1'[Date])
MAXX(allselected('Dim2'),'Dim2'[Date])