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
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
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.