March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
19 | |
17 | |
9 | |
5 |
User | Count |
---|---|
36 | |
29 | |
16 | |
15 | |
12 |