The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello good afternoon, as I put it in the title I have to create a stacked column chart that I look like it looks like this.
The complexity I find in doing so has to do with the way in which the measurement that the calculation has to take has to be made.
The data with which the calculation is made arrives as follows:
Three measures are evaluated, one for treated water, one for potable water and one for packaged water, these columns can have three values, "Meets Requirements", "Does Not Meet Requirements" and blank, if all the records that are being filtered are blank or "Meets Requirements" the final result must be "Meets Requirements", if there is a single record with a value "Does Not Meet Requirements" the final result must be "Does Not Meet Requirements", however, for the representation in the graph what is expected is to show the count of the number of "Plants" that meet ("Meets Requirements") or that do not meet "Does Not Meet Requirements", coloring green those that meet and red those that do not.
The graph should show "Potable water", "Packaged water" and "Treated water" in a different bar, remembering that it is required to be a stacked graph.
The measurements that have been made to make the calculations are of this type:
The question I have is how to configure the stacked column chart meeting these conditions.
One thing I had tried to do was create a second view where I transposed the data as follows.
and create the following measurement
And this worked partially for me if I set the graph like this
But if I set it like this in the green part it counts all the plants without excluding those that result in "Does Not Meet Requirements"
In that example, only the red part should appear, not the green part, since only a plant that does not comply is being filtered.
In whatever way you can help me, I will thank you.
Best regards.
Solved! Go to Solution.
Hi @Syndicate_Admin ,
We are grateful for your participation in the Microsoft Fabric Community forum.
While some aspects were a bit unclear, I’ve done my best to provide suggestions based on my interpretation of your requirements.
Packaged Water Compliance =
IF(
COUNTROWS(FILTER('water', 'water'[Compliance Category] = "Packaged Water Compliance" && 'water'[Compliance Status] = "Does Not Meet Requirements")) > 0,
"Does Not Meet Requirements",
"Meets Requirements"
)
-------------------------------------------------------------------------------------------------------------------
Potable Water Compliance =
IF(
COUNTROWS(FILTER('water', 'water'[Compliance Category] = "Potable Water Compliance" && 'water'[Compliance Status] = "Does Not Meet Requirements")) > 0,
"Does Not Meet Requirements",
"Meets Requirements"
)
-------------------------------------------------------------------------------------------------------------------
Treated Water Compliance =
IF(
COUNTROWS(FILTER('water', 'water'[Compliance Category] = "Treated Water Compliance" && 'water'[Compliance Status] = "Does Not Meet Requirements")) > 0,
"Does Not Meet Requirements",
"Meets Requirements"
)
-------------------------------------------------------------------------------------------------------------------
Plants That Meet =
COUNTROWS(
FILTER('water', 'water'[Compliance Status] = "Meets Requirements")
)
-------------------------------------------------------------------------------------------------------------------
Plants That Do Not Meet =
COUNTROWS(
FILTER('water', 'water'[Compliance Status] = "Does Not Meet Requirements")
)
-------------------------------------------------------------------------------------------------------------------
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Thanks,
Priyanka.
CST community member.
Hi @Syndicate_Admin
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.
Hi @Syndicate_Admin , Just checking in as we haven’t received an update from you regarding last response. Were you able to resolve the issue?
If solution was helpful, please mark it as Accept Answer and click Yes to confirm.
Feel free to let us know if you have any further questions—we’re here to help!
Thank you for being a part of the Microsoft Fabric Community Forum!
Hi @Syndicate_Admin ,
We are grateful for your participation in the Microsoft Fabric Community forum.
While some aspects were a bit unclear, I’ve done my best to provide suggestions based on my interpretation of your requirements.
Packaged Water Compliance =
IF(
COUNTROWS(FILTER('water', 'water'[Compliance Category] = "Packaged Water Compliance" && 'water'[Compliance Status] = "Does Not Meet Requirements")) > 0,
"Does Not Meet Requirements",
"Meets Requirements"
)
-------------------------------------------------------------------------------------------------------------------
Potable Water Compliance =
IF(
COUNTROWS(FILTER('water', 'water'[Compliance Category] = "Potable Water Compliance" && 'water'[Compliance Status] = "Does Not Meet Requirements")) > 0,
"Does Not Meet Requirements",
"Meets Requirements"
)
-------------------------------------------------------------------------------------------------------------------
Treated Water Compliance =
IF(
COUNTROWS(FILTER('water', 'water'[Compliance Category] = "Treated Water Compliance" && 'water'[Compliance Status] = "Does Not Meet Requirements")) > 0,
"Does Not Meet Requirements",
"Meets Requirements"
)
-------------------------------------------------------------------------------------------------------------------
Plants That Meet =
COUNTROWS(
FILTER('water', 'water'[Compliance Status] = "Meets Requirements")
)
-------------------------------------------------------------------------------------------------------------------
Plants That Do Not Meet =
COUNTROWS(
FILTER('water', 'water'[Compliance Status] = "Does Not Meet Requirements")
)
-------------------------------------------------------------------------------------------------------------------
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Thanks,
Priyanka.
CST community member.
Hi @Syndicate_Admin , Just checking in as we haven’t received an update from you regarding last response. Were you able to resolve the issue?
If solution was helpful, please mark it as Accept Answer and click Yes to confirm.
Feel free to let us know if you have any further questions—we’re here to help!
Thank you for being a part of the Microsoft Fabric Community Forum!
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...