Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Exceuse me please
I 'm trying the dax formula for district count number of customer 3 month ago,
I used formula
But it mistake
As following below picture
Thank you for your helphttps://drive.google.com/file/d/1UzeeB14hWkPPSdXfqVIQJbosFekPkq78/view?usp=sharing
Hi @daedah,
Edate function might be helpful for you.
Please check following measure and see if the result achieve your expectation:
sum_last3month =
VAR l3 =
EDATE ( MAX ( 'Table'[Date] ), -3 )
VAR d =
MAX ( 'Table'[Date] )
RETURN
CALCULATE (
SUM ( 'Table'[Customer] ),
FILTER ( ALL ( 'Table' ), 'Table'[Date] < d && 'Table'[Date] >= l3 )
)
Result would be shown as below:
BTW, Pbix as attached, hopefully works for you.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
excuse me please
It formula don't show value
Recommend again please
Hi @daedah ,
As we can see in the picture, the "customer" column in my sample data actually is "number of customers".
If the "customer" column in your data is "name of customers", please replace "SUM ( 'Table'[Customer] )" to "DISTINCTCOUNT('Table'[Customer])"
Best Regards,
Jay
Hi,
Replace SUM ( 'Table'[Customer] ) with DISTINCTCOUNT('Table'[Customer])
Hope this helps.
User | Count |
---|---|
84 | |
79 | |
70 | |
47 | |
41 |
User | Count |
---|---|
108 | |
52 | |
50 | |
40 | |
40 |