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.
Hi Guys, I am facing issue counting the below rows where the condition is like:
Count number of rows for each group name where
Open date <= Date and resolve date is >= Date. So basically the count for 01-01-2020 would be 30 and for 02-01-2020 should also be 30 even though there is no open date or resolve date for that day.
I have created this table with required columns from the calendar and the fact table.
Appreciate your help in advance.
Hi @Anonymous ,
I have created a simple sample, please refer to it to see if it helps you.
Create measures.
Measure =
CALCULATE (
COUNT('Table'[date]),
FILTER (
ALL ( 'Table' ),
'Table'[date] = SELECTEDVALUE ( 'Table'[open date] )
&& 'Table'[date] <= SELECTEDVALUE ( 'Table'[close date] )
&& 'Table'[date] = SELECTEDVALUE ( 'Table'[date] )
)
)
Measure 2 = COUNTAX(FILTER(ALL('Table'),[Measure]<>BLANK()),[Measure])
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
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.
Hi @Anonymous
For a calculated column please use
Count =
COUNTROWS (
FILTER (
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[FactTable.Group Name] ) ),
'Table'[FactTable.Open Date] <= 'Table'[Date]
&& 'Table'[FactTable.Resolve Rate] >= 'Table'[Date]
)
)
For a measure you can use
Count =
COUNTROWS (
FILTER (
'Table',
'Table'[FactTable.Open Date] <= 'Table'[Date]
&& 'Table'[FactTable.Resolve Rate] >= 'Table'[Date]
)
)
hi @Anonymous
unable to follow. Could you elaborate how you get 30 in your example date, say 01-01-2020?
So the count is basically 30 since the open date is equal to Date and resolve dates are greater than Date. So count of all the tickets falling as per above criteria is 30 for that group name.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
9 | |
9 |
User | Count |
---|---|
20 | |
13 | |
12 | |
11 | |
8 |