Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I have scoured these forums for what seems like an easy solution, and I very well still might be missing something, but I haven't been able to find my answer. Basically, I have a DAX query that's going to contain several VARs and I need to RETURN all of them. No filters, conditions, etc.
My current DAX measure:
Hi @turp111 ,
A measure can only return one value. If you want to get multiple values, please try concatenating them into a string.
Best Regards,
Wearsky
Thank you! Well, I was putting each category as a VAR in one measure so they all display in my matrix in one 'column' as opposed to separate ones. I did have it this way before but when I added each measure to the Values section it created a new column. I will review your suggestion and give it a try and response later.
hi @turp111
although it is not that much clear for me why you need to write a measure with these variables and why didn't write measure for each of these variables, but this is the solution based on my understanding of your problem.
you can create a table which does not have relationship with other tables. write each variable name in rows and recommend to have ID's like 1,2,3 for each row. for example:
1 | Participants Count |
2 | Active plan <1 |
3 | Active plan < 3 |
then use the second column of this table in your visual and add this to the return of your measure:
if (selectedvalue( new_table(ID) = 1 , _particCount , if (selectedvalue(new_table(ID) = 2 , _planUnder1 , if ( selectedvalue(new_table( ID) =3 , _planUnder3 )))
If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
11 | |
9 | |
6 |