cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Route11
Post Prodigy
Post Prodigy

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

@Route11 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 Super User!




View solution in original post

3 REPLIES 3
PattemManohar
Community Champion
Community Champion

@Route11 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 Super User!




View solution in original post

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

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
MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

July 2021 Update 768x460.png

Check it out!

Click here to read more about the July 2021 Updates

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Urdu Hindi D365 Bootcamp 768x460.png

Urdu Hindi D365 Bootcamp

Dont miss our very own April Dunnam’s The Developer Guide to the Galaxy! Find out what the Power Platform has to offer for the traditional developer.

Top Solution Authors
Top Kudoed Authors