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 dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
30 | |
13 | |
11 | |
9 | |
6 |