Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Amardeep100115
Post Prodigy
Post Prodigy

count/distinct coun of current month, if there is no Month/value selected in filter visual

Hi 

 

I wish to get a count/distinctcount of currunt month of "PIN Code" if there is no Month/value selected in filter visual.

I have tried below formula in my base report but its not showing me correct value,

 

Please help

 

Pre soj = IF(HASONEVALUE(Query1[Mnth_Yr]),[HC],COUNTAX(FILTER(Query1,Query1[File Date]="August_2019"),[HC]))

 

https://1drv.ms/u/s!Ai3rGPgy20kLwUsY5cG6RUA71nDt?e=lFOkYL

Amardeep Bhingardeve
1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @Amardeep100115 ,

 

Update your measure as below.

Measure 2 = 
var currentmonth = FORMAT(TODAY(),"mmmyyyy")
return
IF (
    ISFILTERED ( Sheet4[month] ),
    DISTINCTCOUNT ( Sheet4[Pin No] ),
    CALCULATE (
        DISTINCTCOUNT ( Sheet4[Pin No] ),
        FILTER ( Sheet4, FORMAT ( 'Sheet4'[As of date], "mmmyyyy" ) = "Jul2019" )
    )
)
Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

1 REPLY 1
v-frfei-msft
Community Support
Community Support

Hi @Amardeep100115 ,

 

Update your measure as below.

Measure 2 = 
var currentmonth = FORMAT(TODAY(),"mmmyyyy")
return
IF (
    ISFILTERED ( Sheet4[month] ),
    DISTINCTCOUNT ( Sheet4[Pin No] ),
    CALCULATE (
        DISTINCTCOUNT ( Sheet4[Pin No] ),
        FILTER ( Sheet4, FORMAT ( 'Sheet4'[As of date], "mmmyyyy" ) = "Jul2019" )
    )
)
Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.