Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi all
I by my self have a issue to explain what the issues is. At least I know what I need:
I have a set of conditions in Variables:
__Test_Successful_Status_ =
VAR Switchover = if(Query1[SwitchoverDate] = BLANK() && Query1[Status] = "Successful", "SwitchoverDate_must be filled out, ", BLANK())
VAR Switchback = if(Query1[SwitchbackDate] = BLANK() && Query1[Status] = "Successful", "SwitchbackDate_must be filled out, ", BLANK())
VAR StatusReason = if(Query1[StatusReason] = BLANK() && Query1[Status] = "Successful", "StatusReason_must be filled out, ", BLANK())
Return
Switchover & Switchback & StatusReason
When I add this to a column, I receive OR a single value OR a concatenate string of value. So far so good.
Here I need your help: How to get a) a list of all the individual values and b) a count of all values.
Many thanks
Brani
Hi all
I am in need of your help. I've created a screenshot with the draft/outcome I would need:
Hi @Brani ,
A list of all the individual values (including blanks) is:
VAR _list = { Switchover, Switchback, StatusReason }
A list of all the individual values except blank values is:
VAR _listWithoutBlanks = FILTER ( _list, NOT ( ISBLANK ( [Value] ) ) )
A count of all values except blanks is:
VAR _countNoBlanks = COUNTAX ( _list, [Value] )
A count of all values including blanks is (actually it's always 3 because you know you created a list from 3 elements):
VAR _countAll = COUNTROWS ( _list )
BR
Martin
Hi @Martin_D
Thank you for replying.
I've added "Var List_" to my query but now it is showing "A table of multiple values was supplied where a single value was expected."
__Test_Successful_Status_ =
VAR Switchover = if(Query1[SwitchoverDate] = BLANK() && Query1[Status] = "Successful", "SwitchoverDate_must be filled out, ", BLANK())
VAR Switchback = if(Query1[SwitchbackDate] = BLANK() && Query1[Status] = "Successful", "SwitchbackDate_must be filled out, ", BLANK())
VAR StatusReason = if(Query1[StatusReason] = BLANK() && Query1[Status] = "Successful", "StatusReason_must be filled out, ", BLANK())
VAR List_ = { Switchover , Switchback , StatusReason }
Return
List_
When trying to summarize the table, I've got this error message:
Can you advice?
Many thanks
Brani
Hi @Brani ,
A measure cannot return a list or table, a measure can only return a single value. You could return e.g. the variables _countNoBlanks or _countAll. What you call a "list" is, maybe, not technically a list in terms of the DAX programming language, but a visual on a report table? Maybe a table visual?
For less reply ping-pong, would you mind providing the following:
BR
Martin
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
8 | |
8 | |
8 |
User | Count |
---|---|
13 | |
12 | |
11 | |
10 | |
8 |