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 All,
I've long table (+25 columns - all of date type)
need DAX for calculated column - just showing total number of records per row.
if 1 row has 3 date columns populated - then in my calculated column it should show 3
hopefully this is easy ?
thanks
Solved! Go to Solution.
Hi @neees78 ,
If you want to use calculated column, you need to unpivot all these columns. But you can add custom column in query editor since the blanl value show null in power query:
= Table.AddColumn(#"Replaced Value", "Custom", each List.Count(List.RemoveNulls(Record.ToList(_))))
For more details, please refer to the pbix file.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi @neees78 ,
If you want to use calculated column, you need to unpivot all these columns. But you can add custom column in query editor since the blanl value show null in power query:
= Table.AddColumn(#"Replaced Value", "Custom", each List.Count(List.RemoveNulls(Record.ToList(_))))
For more details, please refer to the pbix file.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
It'd be easier if you unpivoted those columns, but if for whatever reason you can't, you could just do some sort of monster if - isblank formula?
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 |
---|---|
106 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |