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 there,
I have a requirement to add inactive date to a measure.
Please see below sample data for Table : Test
So here my "Added Date" is used to create relationship between the calendar table & Test
I need to get the count of occupancies by month year upto 15th date of each month for which i am using the below measure.
measure=
Var _max = EOMONTH(MAXX(ALLSELECTED('Calendar'),'Calendar'[Date]),-1)+15
return
CALCULATE(SUM(TCC_Kerbside[Occupancies]),DATESYTD('Calendar'[Date]),'Calendar'[Date]<= _max)
Now i want to remove the occupancies for which there is inactive date.
e.g. 22 occupancies which were added on 01/07/2021 but became inactive on 21/09/2021 .
and 8 occupancies became inactive on 08/10/2021.
so when a user select october month in the slicer it should do (58594 -(22 +8)) because my reporting month is upto 15th of each month.
Hope this is helpful.
Solved! Go to Solution.
I created a variable for inactive
Hi @chavanr
Please provide some data and conditions and why the day is inactive day.
Best Regards
Community Support Team _ polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I created a variable for inactive
@chavanr Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Have you tried the it as values? and used not in ?
&& NOT ( Date ) IN Inactive column}
I'm a newbie, have you tried adding one more condition to the filter within calculate function?
CALCULATE(SUM(TCC_Kerbside[Occupancies]),DATESYTD('Calendar'[Date]),'Calendar'[Date]<= _max && 'Calendar'[Date] >Inactive_date) ?
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 |
---|---|
98 | |
96 | |
75 | |
71 | |
64 |
User | Count |
---|---|
143 | |
109 | |
103 | |
82 | |
74 |