The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I have found:
all clients - CALCULATE(COUNTA('Outflow'[ID]);ALLSELECTED('Outflow'[LastActiveDate]))
previous month clients - CALCULATE(COUNTA('Outflow'[ID]);PREVIOUSMONTH(DATESMTD('Outflow'[LastActiveDate])))
current month clients - CALCULATE(COUNTA('Outflow'[ID]);DATESMTD('Outflow'[LastActiveDate]))
But I don't know how to count all clients beyond/without two last months?
Solved! Go to Solution.
Eventually I did this with DAX: Clients = CALCULATE(COUNTA('Outflow'[ID]);FILTER('Outflow;'Outflow'[Date]<DATE(YEAR(today());MONTH(today())-1;1)))
Eventually I did this with DAX: Clients = CALCULATE(COUNTA('Outflow'[ID]);FILTER('Outflow;'Outflow'[Date]<DATE(YEAR(today());MONTH(today())-1;1)))
Try the below DAX formula
Clients = CALCULATE(COUNTA('Outflow'[ID]);YEAR('Outflow'[LastActiveDate]) <= YEAR(TODAY()) && MONTH('Outflow'[LastActiveDate]) <= MONTH(TODAY())-2)
Oh! It works only for this year, previous year has shown until April (in matrix) =(((
Try this one....
Concatenate Year and Month No. and this referes to Year(Last Active Date) and Month(LastActiveDate) respectively
ie. YearMonth =
2018 - Apr looks like 201804
2018 - Mar looks like 201803
2018 - Feb looks like 201802
.
.
.
.
2017 - Jan as 201701
2016 - Dec as 201612
2016 - Nov as 201611
Now modify the earlier DAX based on this column
Clients = CALCULATE(COUNTA('Outflow'[ID]);YEARMONTH <= MAX(YEARMONTH) - 2)
where YEARMONTH is the newly calculated column
Hope this solves this issue!!!
I did this:
ClientsUntil2LM = CALCULATE(COUNTA('Outflow'[ID]);YEAR('Outflow'[LastActiveDate]) = YEAR(TODAY()) && MONTH('Outflow'[LastActiveDate]) <= MONTH(TODAY())-2)
LYsclients = CALCULATE(COUNTA('Outflow'[ID]);YEAR('Отток - всего'Outflow'[LastActiveDate])<>YEAR(TODAY()) )
Clients = [ClientsUntil2LM] + [LYsclients]
Thank you for your help!
User | Count |
---|---|
65 | |
60 | |
55 | |
54 | |
31 |
User | Count |
---|---|
180 | |
88 | |
70 | |
46 | |
46 |