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.
Hello Again,
I'm creating a new table that has a count of all the new policies by month...
PolCount = GROUPBY(
PolicyData,
PolicyData[Month Written],
"Month Written Count", COUNTX(currentgroup(),PolicyData[TRANSACTIONCODE]))
However, the policy data has multiple transactions and I only want it to count those which are labled as "NEW".
How do I use the COUNTX function as a COUNTIFS function like I would in Excel?
Many thanks
Solved! Go to Solution.
Hi @PowerPaddy,
I test @TomMartens solution, it works fine, please create the new table using the formula below.
PolCount = GROUPBY( PolicyData, PolicyData[Month Written], "Month Written Count", COUNTX(currentgroup(),IF(PolicyData[label]="New",PolicyData[TRANSACTIONCODE],BLANK())))
Please feel free to ask if you still have any other issues. If you have resolved your problem, please mark the right/helpful reply as answer.
Best Regards,
Angelia
Hi @PowerPaddy,
I test @TomMartens solution, it works fine, please create the new table using the formula below.
PolCount = GROUPBY( PolicyData, PolicyData[Month Written], "Month Written Count", COUNTX(currentgroup(),IF(PolicyData[label]="New",PolicyData[TRANSACTIONCODE],BLANK())))
Please feel free to ask if you still have any other issues. If you have resolved your problem, please mark the right/helpful reply as answer.
Best Regards,
Angelia
Hi Angelia,
I know this is an old discussion but I am having issues with GROUPBY and am trying to replicate what you did. Could you walkthrough the logic behind the IF statement ? I understand counting under the condition that [label] = "New" but what does "...PolicyData[TRANSACTIONCODE],BLANK()" do?
Thanks!
Hmm,
I guess this should work
... COUNTX(currentgroup(), IF(PolicyData[Something] = "New" ,PolicyData[TRANSACTIONCODE] ,BLANK() ) )
Hope this works
Regards
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 |
---|---|
109 | |
99 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
102 | |
87 | |
64 |