Measure to Count instances based on Selections

I have a single table and I am trying to create a measure that counts when a Project matches user selected criteria. The page filters are single selection only.

In the attached photo, I would expect the highlighted line to show a ‘1’ and all the other rows shows a ‘0’ because the Actual Date (7/12/2022) falls between the Min/Max of the selected date and the Short Code and Short Name column matches the Selected Value.

That value should change based on the date and short code that the user selects.

I am stuck and looking for ideas. Thanks.

Hi @KrisRichardson.
Are you using the EDNA Date table? Is the Date table marked as a date table?

Providing a PBIX file (power bi file) would help people in forum help you with the issue.

thanks
Keith

1 Like

Thank you Keith.

I am not using a date table. The Date Slicer on the side is just my Actual Date column that is in my table.

I will try and create a dummy version of the PBIX file and upload that as soon as possible.

Adding a date table will help that you select from the date table instead of your fac table. It makes it easier

a quick note - not only does using a date table like the EDNA one ( link ) make projects like this considerably easier, it also helps to reduce the size of your report.

Please see this post (and the followup responses) from Brian J on why you should have a dedicated date table that is marked as your date table. ( link2 )

the TLDR of the above is - if you are not using a date table that is marked as your date table - Power BI is adding an additional invisible date table for every column in your dataset that has a date… and this will bloat most datasets quite a bit.

3 Likes

ty Heather for your comments

1 Like

Thank you @Keith and @Heather for providing your insights on this question

Hello @KRich

good to see that you are having progress with your inquiry. Did the responses above help you solve your inquiry?

I was wondering if it would be possible for us to close this thread temporarily while you are trying out the solutions provided above. Once you have made progress and require additional support, feel free to open a new thread and reach out to us again.

Thank you for your understanding and I look forward to assisting you further in the future.

Thank you everyone for the suggestion. Going to give this a shot and see how it goes. Appreciate it.

Hi @KRich,

Just following up if the response above helps you solve your inquiry.
If it did, please mark his answer as the SOLUTION.

We’ve noticed that no response was received from you on the post above. In case there won’t be any activity on it in the next few days, we’ll be tagging this post as Solved.