Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a table that looks like this:
Account Name | Account Owner | Days Since Last Activity |
Account A | Allison | 140 |
Account B | Allison | 20 |
Account C | Jim | 5 |
Account D | Jim | 10 |
I need to have a card that shows the % of their accounts with activity in the last 90 days. So, I need:
(count of accounts by account owner where days since last activity < 90) / (count of accounts by account owner)
The outcome should be Allison is 50% and Jim is 100%
How can I accomplish this?
Solved! Go to Solution.
Hi @kault ,
Here are the steps you can follow:
1. Use [Account Owner] as the slicer
2. Create measure.
Result =
var _countgroup=COUNTX(FILTER(ALL('Table'),'Table'[Account Owner]=MAX('Table'[Account Owner])),[Account Owner])
var _count90=COUNTX(FILTER(ALL('Table'),'Table'[Account Owner]=MAX('Table'[Account Owner])&&'Table'[Days Since Last Activity]<90),[Account Owner])
return
DIVIDE(_count90,_countgroup)
3. Result:
Select Allison, 50% is displayed.
Select Jim, 100% is displayed.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @kault ,
Here are the steps you can follow:
1. Use [Account Owner] as the slicer
2. Create measure.
Result =
var _countgroup=COUNTX(FILTER(ALL('Table'),'Table'[Account Owner]=MAX('Table'[Account Owner])),[Account Owner])
var _count90=COUNTX(FILTER(ALL('Table'),'Table'[Account Owner]=MAX('Table'[Account Owner])&&'Table'[Days Since Last Activity]<90),[Account Owner])
return
DIVIDE(_count90,_countgroup)
3. Result:
Select Allison, 50% is displayed.
Select Jim, 100% is displayed.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hey @kault ,
the following measure should do that:
% of Total < 90 =
DIVIDE(
CALCULATE(
COUNTROWS( myTable ),
myTable[Days Since Last Activity] < 90
),
CALCULATE(
COUNTROWS( myTable ),
ALL( myTable[Account Name] )
)
)