Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Dear All PBI Experts,
I have the table example as below:
| Task | Value |
| Ind123 | FALSE |
| Ind345 | TRUE |
| Ind567 | FALSE |
| Ind789 | TRUE |
| Fam123 | FALSE |
| Fam345 | TRUE |
| Fam567 | FALSE |
| Fam789 | TRUE |
I would like to create a stacked column chart to shows the different task values for Ind and Fam. How is this possible?
Thank you.
Solved! Go to Solution.
Hi @hidzirf ,
Create a column with below code:-
Column =
IF ( CONTAINSSTRING ( [Task], "Ind" ), "Ind", "Fam" )
Now create two measures like below:-
_true =
COUNTROWS ( FILTER ( 'Table', 'Table'[Value] = TRUE () ) )_false =
COUNTROWS ( FILTER ( 'Table', 'Table'[Value] = FALSE () ) )
Output:-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Hi @hidzirf ,
Create a column with below code:-
Column =
IF ( CONTAINSSTRING ( [Task], "Ind" ), "Ind", "Fam" )
Now create two measures like below:-
_true =
COUNTROWS ( FILTER ( 'Table', 'Table'[Value] = TRUE () ) )_false =
COUNTROWS ( FILTER ( 'Table', 'Table'[Value] = FALSE () ) )
Output:-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Dear Samarth,
I have tried and this has resolved my problem.
Thank you so much for your help.
@hidzirf
You can create two measures
calculate(count(Value), filter(tablename, value = "True")
calculate(count(Value), filter(tablename, value = "false")
and use these measures in the Values in Stacked bar chart and you will get the required result!
Proud to be a Super User!
Hi VijayP,
Thank you for the guidance but unfortunately, the result come out not as what I'm required. I need to group "Ind" and "Fam" separately. The bar chart should show that the "Ind" count of value is 4 with 2 false and 2 true, same goes with "Fam".
Appreciate it if there is any better solution for this?Thank you.
@hidzirf
Do you wish to show the count of true and False separately? What should be the outcome look like?
Proud to be a Super User!
Hi VijayP,
Thank you for your reply. Yes, I would like to count the True and False separately for each type of task. The outcome will show like this:
Thank you.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 38 | |
| 33 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 69 | |
| 66 | |
| 41 | |
| 32 | |
| 25 |