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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Edit DAX to show current period only

Hi Experts

 

How would you edit the following DAX  measure to summarize the current period only based on column Month Year...and not show values for MAr 18, Jun 18 etc...previous months of the curreent year..

 

Taiwan Summary = 
SUMMARIZECOLUMNS (
    'Taiwan Calendar'[Month Year],
    'Taiwan Calendar'[Country],
    "DaysinMonth", MIN ( 'Taiwan Calendar'[DaysinMonth] ),
    "WorkingDaysNumber", MIN ( 'Taiwan Calendar'[WorkingDays] ),
    "WorkingDaysLeft",MIN ('Taiwan Calendar'[Workdays Left in Month]), 
    "Non-Working Days", SUM ( 'Taiwan Calendar'[Non-Working Days] ),
    "WorkingDaysPassed", MIN ( 'Taiwan Calendar'[Working Days Passed] )

)
1 ACCEPTED SOLUTION
PattemManohar
Community Champion
Community Champion

@Anonymous Please give a try with this.... 

 

Taiwan Summary = 
SUMMARIZECOLUMNS (
    'Taiwan Calendar'[Month Year],
    'Taiwan Calendar'[Country],
    FILTER('Taiwan Calendar', 'Taiwan Calendar'[Month Year] =  FORMAT(TODAY(),"MMMM YYYY")),
    "DaysinMonth", MIN ( 'Taiwan Calendar'[DaysinMonth] ),
    "WorkingDaysNumber", MIN ( 'Taiwan Calendar'[WorkingDays] ),
    "WorkingDaysLeft",MIN ('Taiwan Calendar'[Workdays Left in Month]), 
    "Non-Working Days", SUM ( 'Taiwan Calendar'[Non-Working Days] ),
    "WorkingDaysPassed", MIN ( 'Taiwan Calendar'[Working Days Passed] )
)

Hope this helps !! If not, then Sample data will be really helpful.





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




View solution in original post

3 REPLIES 3
PattemManohar
Community Champion
Community Champion

@Anonymous Please give a try with this.... 

 

Taiwan Summary = 
SUMMARIZECOLUMNS (
    'Taiwan Calendar'[Month Year],
    'Taiwan Calendar'[Country],
    FILTER('Taiwan Calendar', 'Taiwan Calendar'[Month Year] =  FORMAT(TODAY(),"MMMM YYYY")),
    "DaysinMonth", MIN ( 'Taiwan Calendar'[DaysinMonth] ),
    "WorkingDaysNumber", MIN ( 'Taiwan Calendar'[WorkingDays] ),
    "WorkingDaysLeft",MIN ('Taiwan Calendar'[Workdays Left in Month]), 
    "Non-Working Days", SUM ( 'Taiwan Calendar'[Non-Working Days] ),
    "WorkingDaysPassed", MIN ( 'Taiwan Calendar'[Working Days Passed] )
)

Hope this helps !! If not, then Sample data will be really helpful.





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Anonymous
Not applicable

i cannot give sample data but a image of the table... So from th eimage i wanrt to show only Oct 2018 line and nothing else...

 

Capture.PNG

Anonymous
Not applicable

Hi Expert

 

Solved the solution....using date but not MMMM, YYYY

Taiwan Summary = 
SUMMARIZECOLUMNS (
    'Taiwan Calendar'[Month Year],
    'Taiwan Calendar'[Date],
    'Taiwan Calendar'[Country],
    FILTER(ALL('Taiwan Calendar'),'Taiwan Calendar'[Date] = MAX('Taiwan Calendar'[Date])),
    "DaysinMonth", MIN ( 'Taiwan Calendar'[DaysinMonth] ),
    "WorkingDaysNumber", MIN ( 'Taiwan Calendar'[WorkingDays] ),
    "WorkingDaysLeft",MIN ('Taiwan Calendar'[Workdays Left in Month]), 
    "Non-Working Days", SUM ( 'Taiwan Calendar'[Non-Working Days] ),
    "WorkingDaysPassed", MIN ( 'Taiwan Calendar'[Working Days Passed] )
)

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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