Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello, I have 4 measures:
'All data with group speciality'[Day Case count] // returns number
'All data with group speciality'[Inpatient Count] //returns number
'All data with group speciality'[Day Case count current year] //returns number
'All data with group speciality'[Inpatient Count current year] // return number
Pie chart visualisation connected to DAX formula:
Case type = IF(
'All data with group speciality'[selected value] = "All",
'All data with group speciality'[Day Case count] && 'All data with group speciality'[Inpatient Count], // return 2 measures in pie chart
'All data with group speciality'[Day Case count current year] && 'All data with group speciality'[Inpatient Count current year] // return 2 mesures in pie chart
)
However, this doesn't work. I don't have any error, but my pie chart is blank. Any idea how can I correct DAX formula?
Hi @alks_skla_f ,
It seems that your [Case type] is a calculated column. I think "&&" in your case type code will return boolean like Ture or False. If you want to return number type result, I suggest you to try "+" as FarhanJeelani mentioned above.
If his reply could solve your issue please mark it as a solution and more people will benfenit from it.
If you still have questions, please share a sample file with us. I think you issue should be caused by your data model.
You can also share a screenshot with the result you want to us. We also need to know the four measures' calculate logic.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @alks_skla_f ,
Try
Case Type =
IF(
'All data with group speciality'[selected value] = "All",
'All data with group speciality'[Day Case count] + 'All data with group speciality'[Inpatient Count], // Sum of both measures for "All"
'All data with group speciality'[Day Case count current year] + 'All data with group speciality'[Inpatient Count current year] // Sum of both measures for current year
)
It will not work as I need. This formula just sums two values and in the end I return one value in pie chart. However, I need to return two values in pie chart.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
9 | |
9 | |
8 | |
8 |
User | Count |
---|---|
14 | |
12 | |
11 | |
11 | |
8 |