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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Amardeep100115
Post Prodigy
Post Prodigy

Currant month value if month or any slicer option is not selected

Sample Date 

 

Hello super users,

 

i wish to have a distict count of customer ID, like i have shared sample data but here i wish to have data like if there is no option selected then the count of distict count should be show for currant month and if i select month/region/City or any of each slicer the count should be display the value accordingly. 

 

Please help 

 

AB
2 REPLIES 2
Amardeep100115
Post Prodigy
Post Prodigy

Hi @amitchandak 

 

Thank you for your reply but,

 

i am using below DAX for having the result but when i select it shows aveage of that Fiscal year. instade of currant month of fiscal year.

 

Measure 2 =
VAR _currentmonth=CALCULATE(MAX('Fiscal Calendar'[FiscalYear]),FILTER('Active Headcount',[ActiveHeadcount HR])) return
IF(HASONEVALUE('Fiscal Calendar'[Month]),[ActiveHeadcount HR],CALCULATE([ActiveHeadcount HR],FILTER('Fiscal Calendar','Fiscal Calendar'[FiscalYear]= _currentmonth)))
 
 
what i want if i have selected fiscalYear i.e. FY 2020 then visual should display value for currant month and if i select FY2019 the it should display Sept 2019 values
 
and also acording to other slicer that value should change like if i select city the citywise data should display and acording to other slicers as well 
 
hope i am clear on my results
 
 
AB
amitchandak
Super User
Super User

If you take distinctcount(Table[CutsomerID]), it should do that and it will also respond to the filter.

 

If you always without filter

calculate(distinctcount(Table[CutsomerID]),all(Table))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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