Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
I need your clarification I've table and I need to count all contents include numbers and text on specific column with specific condition
When use calculate(countax(Roster[today shift]), Age < 34) it gives me wrong result while calculate(counta(Roster[today shift], Age < 34) give right one what's the difference between them in this case?
I think I still don't understand filter concept in dax
Solved! Go to Solution.
According to your description, Here is why using calculate(countax(Roster[today shift])), Age < 34) gives different results,
Assuming that the calculation context is the same for both measures
1.calculate(counta(Roster[today shift], Age < 34)) counts the number of rows with non-null values in the today shift column where the age column is less than 34 in the current calculation context.
Related Links:
Context in DAX Formulas - Microsoft Support
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
According to your description, Here is why using calculate(countax(Roster[today shift])), Age < 34) gives different results,
Assuming that the calculation context is the same for both measures
1.calculate(counta(Roster[today shift], Age < 34)) counts the number of rows with non-null values in the today shift column where the age column is less than 34 in the current calculation context.
Related Links:
Context in DAX Formulas - Microsoft Support
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Thx for your help
what I notice that when use iterative x function within filter function such as calculate it will ignore the filter if it happen in same table so in this case normal function like counta is right choice for my case
This both makes sense and makes my head hurt
I think may because we've misunderstanding for filter and x-function behaviour
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
27 | |
15 | |
11 | |
8 | |
8 |
User | Count |
---|---|
19 | |
15 | |
15 | |
14 | |
13 |