Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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
@matthewwylie , seems like very similar to my HR blog
refer
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
25 | |
20 | |
18 | |
17 | |
16 |
User | Count |
---|---|
37 | |
20 | |
19 | |
17 | |
11 |