cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
mcflurry
Frequent Visitor

Single stacked bar from column filtering content

Hello everyone,

I'm starting to use this and would like to create a stacked bar but am completely lost.

I have this column:

 

mcflurry_0-1619703614676.png

And I would like to create a single stacked bar that count everything that contains "linux", contains "windows", and doesn't contains windows nor linux:

 

mcflurry_1-1619703808891.png

How can i achieve this? I've been trying quick measures for hours without success.

 

3 REPLIES 3
PoojaDarbhe
Resolver I
Resolver I

Hi @mcflurry ,

 

Please try the below dax to create a column

 

testCol = IF(CONTAINSSTRING(Test[OS], "LINUX"), "LINUX", IF(CONTAINSSTRING(Test[OS], "WINDOWS"), "WINDOWS", "Other"))
 
Now pull this column in legend field of stacked bar chart and on values pull the same field having count of the same.
 
This will give you the expected result.
Let me know in case you need more clarification.
 
Best regards,
Pooja Darbhe

Great, it works.

A few more adjustments.

Can I change order of values in bar?

And can i ignore some values containing some string in any of the 3 filtered strings?

Very happy to hear that @mcflurry.

You can filter the values in filter pane, it will work as expected.

And from sort you can sort the values.

Let me know in case you need more information.

 

It will be Great if you accept the Solution. Thanks alot.

 

Best regards,

Pooja Darbhe

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Top Solution Authors
Top Kudoed Authors