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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
uj91
New Member

Only to show this month dates and last month dates in a visual coming from field parameter

Below is the field parameter :

Toggle Summary_CC = {
    ("This Month", NAMEOF('Reporting.CrossChannel'[This Month Impressions]), 0),
    ("Last Month", NAMEOF('Reporting.CrossChannel'[Last Month Impressions]), 1),
    ("YTD", NAMEOF('Reporting.CrossChannel'[YTD Impressions]), 2)
}

I need to show only this month dates in the visual when this month is selected in the filter and same for last month and YTD. As of now it is also showing all the historiccal dates. 

uj91_0-1763432166071.png

In the above visual only dates from 1st November till today needs to be shown in the visual. Same to be done for last month and YTD. 

Any suggestions ? 

5 REPLIES 5
uj91
New Member

Hi @danextian , this month means current month , 1st november till todays date. Last month will show all dates from last month 1st october to 31 st october and YTD is from Jan 1 till today date. Some smart way needs to be found so that those historical dates dont show up in the visual only the ones picking from the filter (This month , last month and YTD) 


This month = 

CALCULATE(
    [Total Impressions_CC],
    DATESMTD('Calendar'[Date])
)

last month = 
CALCULATE(
    [Total Impressions_CC],
    DATESMTD(
        DATEADD('Calendar'[Date], +1, MONTH)
    )
)

YTD = 
CALCULATE(
    [Total Impressions_CC],
    DATESYTD('Calendar'[Date])
)


Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

I tried to create a sample pbix file like below.

 

Jihwan_Kim_1-1763440759779.png

 

 

Jihwan_Kim_0-1763440725353.png

 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

This is working but what if we need to get a dimension into the legend. Can the formula be updated for a category ? For now when i am getting a category field to the legend its breaking. 

Any sugesstions ? 

Hi,

Please share your sample pbix file, and then I can try to look into it.

Thank you.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
danextian
Super User
Super User

Hi @uj91 

 

What is your definition of this month? What are the formulas in your field parameters. Also, please provide a workable sample data (not an image), your expected result from the same sample data and your reasoning behind. You may post a link to Excel or a sanitized copy of your PBIX stored in the cloud.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors