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.
select
InstanceId, count(DISTINCT Date)
from
Storage
where
month(date) = 12
and year(date) = 2019
and tags like '%DemoManaged%'
group by
InstanceId
Hello, I am very new to Power BI and need help to create a new measure. The Main table (Storage) has around 25-30 columns.
The table contains InstanceId which I need to display in a Power BI - Table visualization along with the count.
I am able to do it through SQL query, and I am not able to create a new Measure for the same.
Any help is highly appreciated.
Solved! Go to Solution.
Proud to be a Super User!
Hi @sirpentagon ,
We can use the following measure after put the id into the table visual to meet your requirement:
Count =
CALCULATE (
DISTINCTCOUNT ( 'Storage'[Date] ),
FILTER (
'Storage',
'Storage'[Date] >= DATE ( 2019, 12, 1 )
&& 'Storage'[Date] <= DATE ( 2019, 12, 31 )
&& CONTAINSSTRING ( 'Storage'[tags], "DemoManaged" )
)
)
Best regards,
Hi @sirpentagon ,
We can use the following measure after put the id into the table visual to meet your requirement:
Count =
CALCULATE (
DISTINCTCOUNT ( 'Storage'[Date] ),
FILTER (
'Storage',
'Storage'[Date] >= DATE ( 2019, 12, 1 )
&& 'Storage'[Date] <= DATE ( 2019, 12, 31 )
&& CONTAINSSTRING ( 'Storage'[tags], "DemoManaged" )
)
)
Best regards,
Proud to be a Super User!
Check out the July 2025 Power BI update to learn about new features.