Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have a Power Bi report containing two tables
table 1 - Licences table
table 2 - a date table
I created this with:
I want to add a measure to the date table that shows how many licences were active on each date
i.e
count licence number (no. licences) from the licence table where
date table.date >= licences.start date
date table.date <= licences.expiry date
Solved! Go to Solution.
Hi @matthewwylie ,
Please refer this measure.
measure =
CALCULATE (
COUNT ( 'Licences'[licence number] ),
FILTER (
ALLSELECTED ( 'Licences' ),
'licences'[start date] <= SELECTEDVALUE ( 'date'[date] )
&& 'licences'[expiry date] >= SELECTEDVALUE ( 'date'[date] )
)
)
Best Regards,
Jay
Hi @matthewwylie ,
Please refer this measure.
measure =
CALCULATE (
COUNT ( 'Licences'[licence number] ),
FILTER (
ALLSELECTED ( 'Licences' ),
'licences'[start date] <= SELECTEDVALUE ( 'date'[date] )
&& 'licences'[expiry date] >= SELECTEDVALUE ( 'date'[date] )
)
)
Best Regards,
Jay
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
22 | |
11 | |
10 | |
10 | |
8 |