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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors