Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |