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
krrish116
Resolver II
Resolver II

Default Graph should show only current month data..

Hi @amitchandak ,

 

Please help me to sort it out..

The Graph by default has to show only March Site Data ...

 

I had a table with 4 columns  

Date                    Site           Sceneario      Position

20-01-2020         PP              Gifferal           28

20-02-2021         CP             Referral           80

22-02-2021         OP             Gifferal            75

01-03-2021         GP             Referral            24

02-03-2021         QP            Coferral             43

................................................

In the graph

Im showing

Site on Shared Axis 

Position on Column Values

 

Now in this Graph i have to show only present month data.

 

_________________________________________

Answer from ur end:

is filtered should help

Assume MTD using the Date table

All measures below

measure = SUM(Table[position])

MTD = CALCULATE([measure],DATESMTD('Date'[Date]))

Filtered Month = if(isfiltered(Date[Date]), [measure],[MTD])

___________________________________________________________________

By using the above measure im getting values for current month(i.e., March 2021) and if that site doesnt have March month data and it has data only till Dec 2020 then that site is showing values of Dec2020 in that Graph.

But here i have to show only march data and if i select any month from month slicer then the values change.

Please help me in sorting out this.

Thanks,

Krish...

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@krrish116 , based on what I got.

It can show data of march in these case.

Your calendar/date tbale  end on march (with not date this will work)

 

date = calendar(date(2017,01,01), today())

 

or

 

date = calendar(date(2017,01,01), eomonth(today(),0))

 

 

Or create a flag in date table and select this Month

https://youtu.be/hfn05preQYA

 

Month Type = Switch( True(),
eomonth([Date],0)= eomonth(Today(),0),"Current Month" ,
Format([Date],"MMM-YYYY")
)

 

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@krrish116 , based on what I got.

It can show data of march in these case.

Your calendar/date tbale  end on march (with not date this will work)

 

date = calendar(date(2017,01,01), today())

 

or

 

date = calendar(date(2017,01,01), eomonth(today(),0))

 

 

Or create a flag in date table and select this Month

https://youtu.be/hfn05preQYA

 

Month Type = Switch( True(),
eomonth([Date],0)= eomonth(Today(),0),"Current Month" ,
Format([Date],"MMM-YYYY")
)

 

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.