Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi All,
I have a date table to which all other dates in my model are linked. I'd like to create a calculated column on this date table that simply puts "Yes"/"No" depending on whether a value is blank or not in another column in another table. How is this possible as if I try to an "if" statement I can only select measures in other tables, not normal columns. Thank you for any help.
Solved! Go to Solution.
Try creating below calculated column on date dimension.
CALCULATE( iF(ISBLANK(sum(Table[Sales]) ),"No","Yes"),CROSSFILTER('Date'[Date],Table[Date],Both))
Proud to be a Super User!
Try creating below calculated column on date dimension.
CALCULATE( iF(ISBLANK(sum(Table[Sales]) ),"No","Yes"),CROSSFILTER('Date'[Date],Table[Date],Both))
Proud to be a Super User!
@FarhanAhmed may I also ask how you would modify it so that "Yes" would only be assigned to the last 7 days from the first occurence of data in that other table.
i.e. if in your previous DAX expression the last "Yes" was on 15th May then "Yes" would only be assigned to the dates corresponding to 9th - 15th of May, and "No" to all others.
@Anonymous , can be done by creating a column in date table. But try like
Create a table
Tab1 =Summarize(Date,Date[Date],"Sum1",sum(Table[A])+sum(Table[B])+sum(Table1[C]))
And then a column in date table
New Column in Date Table = if(isblank(maxx(filter(Tab1, Tab1[Date] =Date[Date]),Tab1[Sum1])),"No","Yes")
As long as measure are fine with only date filter which is group by it should work for measure
| User | Count |
|---|---|
| 57 | |
| 44 | |
| 32 | |
| 16 | |
| 14 |
| User | Count |
|---|---|
| 84 | |
| 70 | |
| 38 | |
| 27 | |
| 24 |