Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
Check it out now!Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
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!