Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
10 | |
6 |