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.
Hi, I am a newbie in Power Bi and face a problem in evaluating a column. Please see below sample
Account | Deployment |
Company1 | WFH |
Company1 | Office |
Company2 | WFH |
Company3 | Office |
I'd like to create 3 new column/measure that I can use for the Slicer Visual
1. Showing the accounts that have WFH Deployment only
2. Showing the accounts that have Office Deployment only
3. Showing the accounts that have both Office and WFH deployment
Solved! Go to Solution.
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
Deployment measure: =
VAR newtable =
SUMMARIZE (
ADDCOLUMNS (
VALUES ( Data[Account] ),
"@result",
CALCULATE (
SWITCH (
SELECTEDVALUE ( Slicer[Index], 3 ),
1,
CALCULATE (
SELECTEDVALUE ( Data[Account] ),
Data[Deployment] = "WFH"
&& DISTINCTCOUNT ( Data[Deployment] ) = 1
),
2,
CALCULATE (
SELECTEDVALUE ( Data[Account] ),
Data[Deployment] = "Office"
&& DISTINCTCOUNT ( Data[Deployment] ) = 1
),
3,
CALCULATE (
SELECTEDVALUE ( Data[Account] ),
Data[Deployment]
IN { "WFH", "Office" }
&& DISTINCTCOUNT ( Data[Deployment] ) = 2
)
)
)
),
[@result]
)
RETURN
CONCATENATEX ( newtable, [@result] )
Hi,
For a more efficient way here is how to do this with just one measure:
End result (not selecting anything is the case 3.):
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
Proud to be a Super User!
Hi,
I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.
Deployment measure: =
VAR newtable =
SUMMARIZE (
ADDCOLUMNS (
VALUES ( Data[Account] ),
"@result",
CALCULATE (
SWITCH (
SELECTEDVALUE ( Slicer[Index], 3 ),
1,
CALCULATE (
SELECTEDVALUE ( Data[Account] ),
Data[Deployment] = "WFH"
&& DISTINCTCOUNT ( Data[Deployment] ) = 1
),
2,
CALCULATE (
SELECTEDVALUE ( Data[Account] ),
Data[Deployment] = "Office"
&& DISTINCTCOUNT ( Data[Deployment] ) = 1
),
3,
CALCULATE (
SELECTEDVALUE ( Data[Account] ),
Data[Deployment]
IN { "WFH", "Office" }
&& DISTINCTCOUNT ( Data[Deployment] ) = 2
)
)
)
),
[@result]
)
RETURN
CONCATENATEX ( newtable, [@result] )
Hi Jihwan,
I appreciate your solution on this. I just want to ask if is it possible to use a table instead of a card for the list of accounts? I have more accounts to display and I also want my report to be interactive.
Thank you!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
10 | |
6 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
10 | |
6 |