Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi peep's I need some help to see what I have done wrong, I am new to this and I'm still learning DAX.
I am adding a measure to my table to give me an age category for KPI's.
Age Category = if('PBO test 1 - Client Details'[Age]=blank(),blank(),if('PBO test 1 - Client Details'[Age]<18,"16-17",if('PBO test 1 - Client Details'[Age]<20,"18-19",if('PBO test 1 - Client Details'[Age]<22,"20-21",if('PBO test 1 - Client Details'[Age]<24,"22-23",if(‘PBO Client Details’[Age]<25 ”24”,”>25”)))))
Whilst we record the individual ages, the KPI asks for a count of 16-17, 18-19, 20-21, 22-23, 24 and 25.
So the column [Age] is just a list of numbers = for each clients age.
This is what I get
Any help to point me in the right direction gratefully received.
Solved! Go to Solution.
Hi @DemoFour,
With your measure, you could not just use the column ['PBO test 1 - Client Details'[Age]], you could try to convert the 'PBO test 1 - Client Details'[Age] to CALCULATE(SUM('PBO test 1 - Client Details'[Age])) in your formula.
Regards,
Daniel He
Hi @DemoFour,
With your measure, you could not just use the column ['PBO test 1 - Client Details'[Age]], you could try to convert the 'PBO test 1 - Client Details'[Age] to CALCULATE(SUM('PBO test 1 - Client Details'[Age])) in your formula.
Regards,
Daniel He
Thank's for your reply.
I got the following to work
But whilst the suggestion you made worked, I could not traslate it into visual. I think I need to do some more work on understanding CALCULATE and SUM to understand them better within BI.
kind regards
Hi @DemoFour ,
It is pleasant that your first issue could be solved, could you please mark my reply as answered if possible?
And with your second issue, I suggest to you to re-create a topic in the community and you could also refer to below link about CALCULATE:
https://www.absentdata.com/power-bi/how-to-use-calculate-in-power-bi/
https://databear.com/power-bi-tips-calculate-one-of-the-most-used-dax-functions/
Regards,
Daniel He
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 |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |