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,
I'm new to PowerBi. I have got the total count of customers and now trying to create a date Parameter to show active customers asat date. In SQL and Tableau I'm able to achieve this using the below where [Date] is my Parameter
[Start Date] <= [Date] AND IFNULL([End Date],[Date]) >= [Date]
How can I achive the same in PowerBI?
Thanks
Jag
Solved! Go to Solution.
You may refer to the following measure.
Measure = VAR d = SELECTEDVALUE ( 'Calendar'[Date] ) RETURN COUNTROWS ( FILTER ( Table1, Table1[Start Date] <= d && ( ISBLANK ( Table1[End Date] ) || Table1[End Date] > d ) ) )
You may refer to the following measure.
Measure = VAR d = SELECTEDVALUE ( 'Calendar'[Date] ) RETURN COUNTROWS ( FILTER ( Table1, Table1[Start Date] <= d && ( ISBLANK ( Table1[End Date] ) || Table1[End Date] > d ) ) )
Without sample data, something like this should work:
MyCount = CALCULATE(COUNTROWS(table),FILTER(table,[Start Date]<=[Date] && [End Date] >= [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 |
---|---|
112 | |
100 | |
80 | |
64 | |
57 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |