March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
i want to make a measure to count below dates from dim table:
1. Today's date count
2. Current month date count
basically counting dates from my fact table gives me number of my staff not available for work.
i have seperate table for calandar as well which is linked to fact table.
i have tried to create below measure but it does not give correct value.
Today_Count= Calculate(Distinctcount(Fact_NOAV_data[Date]), Fact_NOAV_data=Today())
Current Month Count = Calculate(Count(Fact_NOAV_data[Date]),Month(Fact_NOAV_data[Date]=Month(Today()))
thank your help.
Solved! Go to Solution.
hi @Enan
try like:
@Enan , for current month use
Current Month Count = Calculate(Count(Fact_NOAV_data[Date])filter( Fact_NOAV_data ,eomonth(Fact_NOAV_data[Date],0)=eoMonth(Today(),0) ))
refer
Thanks bro for helping.
todays_count is working fine with countrows.
but current month count with countrows is not working its gives total number of records in the table. I tried with calendar table as well but same answer. How to resolve this plz?
@Enan , for current month use
Current Month Count = Calculate(Count(Fact_NOAV_data[Date])filter( Fact_NOAV_data ,eomonth(Fact_NOAV_data[Date],0)=eoMonth(Today(),0) ))
refer
Dear Amit,
Thank you for your guidance.
Measure worked successfully.
Current Month Count = Calculate(Count(Fact_NOAV_data[Date]),filter( Fact_NOAV_data ,eomonth(Fact_NOAV_data[Date],0)=eoMonth(Today(),0) ))
hi @Enan
try like:
Thanks bro for helping.
todays_count is working fine with countrows.
but current month count with countrows is not working its gives total number of records in the table. I tried with calendar table as well but same answer. How to resolve this plz?
or
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |