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 Folks,
This has been a headscratacher for me. Basically I am trying to get a frequency count of a particular column from another table but only from within a particular month (kind of dynamic) - Current Month, Last Month, Month previous to that.
Based on research I tried to do the following
https://community.powerbi.com/t5/Desktop/Current-Month-Previous-Month-and-Before-Previous-Month/td-p...
To give me the following -
FrequencyCurrentMonth = CALCULATE(COUNT('Table1'[Prospect]),RELATEDTABLE('Table1'),FILTER(ALL('Table1'),MONTH('Table1'[DateTime])=MONTH(TODAY())))
This gave me a blank values with no return.
Was wondering if you can advice or is there something I can use?
Thanks
Solved! Go to Solution.
Hello @CG12
Your best bet in the time intelligent function DATESINPERIOD. You will need a date table but then your calculation is just something like:
3 MO Prospect = VAR EndingDate = MAX ( Dates[Date] ) RETURN CALCULATE( [Prospect], DATESINPERIOD(Dates[Date],EndingDate,-3,MONTH) )
Could you maybe share a sample of your data model if the above doesn't work for you?
Hello @CG12
Your best bet in the time intelligent function DATESINPERIOD. You will need a date table but then your calculation is just something like:
3 MO Prospect = VAR EndingDate = MAX ( Dates[Date] ) RETURN CALCULATE( [Prospect], DATESINPERIOD(Dates[Date],EndingDate,-3,MONTH) )
Could you maybe share a sample of your data model if the above doesn't work for you?
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
144 | |
109 | |
108 | |
88 | |
61 |