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
619SK
Helper I
Helper I

Dynamic Month value while using calculate and filter

How can i create dynamic value to use below month value in calculate & filter formulas

 

Calculate([Distcoun tofnumberMarid],Filter('Global',[mmyy]="Q1-2024 Mar",'Global',[Std]="Yes",Global',[Month]="Mar-24",'Global",[Testing month]="Mar"))))

 

 

 

ABC DescriptionSample (Mar)Passing % _ABCPassing % XYZ
TEST 14090%80%
If Pending from prev month0  
TEST 33090%90
TEST 44080%100
TEST 54070%100
    
    
Table view in BI  
    
Sample (Dist Count for Mar) 
Calculate([Distcoun tofnumberMarid],Filter('Global',[mmyy]="Q1-2024 Mar",'Global',[Std]="Yes",Global',[Month]="Mar-24",'Global",[Testing month]="Mar"))))
1 ACCEPTED SOLUTION
PijushRoy
Super User
Super User

Hi @619SK 

I hope from measure, you will get Idea to create Dynamic value and as per your requirement you can update it. I am taking dynamic value as Current Month, Current Qtr and Current Year

 

= VAR _CurrentQuarterYearMonth = "Q"&QUARTER(Today())&"-"&YEAR(TOday())&" "&FORMAT(Today(),"Mmm")
VAR _CurrentQuarterMonth = FORMAT(Today(),"Mmm")&"-"&YEAR(TOday())
VAR _CurrentMonth = FORMAT(Today(),"Mmm")
RETURN
Calculate([Distcoun tofnumberMarid],Filter('Global',[mmyy]= _CurrentQuarterYearMonth ,'Global',[Std]="Yes",Global',[Month]=_CurrentQuarterMonth,'Global",[Testing month]=_CurrentMonth))))

 

 


Let me know if that works for you


If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.

Thanks
Pijush
Linkedin

View solution in original post

1 REPLY 1
PijushRoy
Super User
Super User

Hi @619SK 

I hope from measure, you will get Idea to create Dynamic value and as per your requirement you can update it. I am taking dynamic value as Current Month, Current Qtr and Current Year

 

= VAR _CurrentQuarterYearMonth = "Q"&QUARTER(Today())&"-"&YEAR(TOday())&" "&FORMAT(Today(),"Mmm")
VAR _CurrentQuarterMonth = FORMAT(Today(),"Mmm")&"-"&YEAR(TOday())
VAR _CurrentMonth = FORMAT(Today(),"Mmm")
RETURN
Calculate([Distcoun tofnumberMarid],Filter('Global',[mmyy]= _CurrentQuarterYearMonth ,'Global',[Std]="Yes",Global',[Month]=_CurrentQuarterMonth,'Global",[Testing month]=_CurrentMonth))))

 

 


Let me know if that works for you


If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.

Thanks
Pijush
Linkedin

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.