Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I need an urgent help from the community members.
Customer Number | Acc Number | Dor Flag | Inactive Flag | Free Flag |
001 | 123 | Y | ||
001 | 234 | Y | ||
001 | 345 | Y |
I need to write a dax function where I need to check the contion where either the dormany flag, Inactive flag or FRee flag is Y then we need to take the count of customer based on the customer number.
Here I am getting 3 as the result but it needs to be considered as 1 as the customer number is same.
This is the Dax i have written.
DAX= countrows(filter(table,dormancyflay="Y" || InactiveFlag="Y" || Free Flag="Y")
I need the distinct count of customer number.
Hi, @niteshtrehan89
You can try the following methods:
Column =
CALCULATE (
COUNTROWS (
FILTER (
'Table',
'Table'[DorFlag] = "Y"
|| 'Table'[lnactiveFlag] = "Y"
|| 'Table'[FreeFlag] = "Y"
)
)
)
Best Regards,
Charlotte Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@niteshtrehan89
Try the following meaure:
NewMeasure=
CALCULATE (
DISTINCTCOUNT ( Table[Cust] ),
FILTER (
table,
Table[dormancyflay] = "Y"
|| Table[InactiveFlag] = "Y"
|| Table[Free Flag] = "Y"
)
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@niteshtrehan89
Not sure how your data is organized and the model. Please share a sample PBIX file with dummy data
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
95 | |
80 | |
67 | |
62 |
User | Count |
---|---|
138 | |
107 | |
104 | |
82 | |
63 |