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
Betwin
Frequent Visitor

Trend charts and Value Chart with filtered Month

Hi All,

 

I have two charts on report page - one trend chart ( 13months ) and also column chart( by country on Axis X - and values) - but this chart is only for one month.  When i try to filtered trend chart by country from column chart it one dot appears for one month.

I know, i can disable filtering charts by interactions, but i would like to filter trend chart only by country, is it even doable ?

 

Thanks

1 ACCEPTED SOLUTION

Hi  @Betwin ,

 

Create a measure instead of using filters,put the filter criteria in the measure,such as below:

Measure = IF(MONTH(MAX('Table'[Date]))=1, CALCULATE(SUM('Table'[Visitor]),FILTER('Table',YEAR('Table'[Date])=YEAR(MAX('Table'[Date]))-1&&MONTH('Table'[Date])=12)), CALCULATE(SUM('Table'[Visitor]),FILTER('Table',YEAR('Table'[Date])=YEAR(MAX('Table'[Date]))&&MONTH('Table'[Date])=MONTH(MAX('Table'[Date]))-1)))

And you will see:

Annotation 2020-08-04 104456.png

Pls note:in column chart,the values field should use the measure while in line chart use the fact table data.

 

Attached is the .pbix file if needed.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
 

View solution in original post

6 REPLIES 6
ryan_mayu
Super User
Super User

@Betwin 

please share the sample data and expected output.

 





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

Proud to be a Super User!




Ryan, really sorry i cannot upload pbix on any filehosting page.

Share the screenshots, hope it would help. - i'm affraid it's not doable.

Thanks anyway.

Betwin
Frequent Visitor

PowerBI_1.PNGPowerBI_2.PNG

Hi  @Betwin ,

 

Remove the "date" from your filters,and you will see:

Annotation 2020-08-03 104120.png

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

Hi @v-kelly-msft , thnaks for replay

 

I cannot get rid off filters on both charts, as column charts should be always filtered on last month values( in this case June 20)

 

I found "around solution" -  duplicate data set - create relantionship beetwen country and use duplicated data to create trend chart.

 

I know that is not the best solution, but i do not have better now.

 

Thanks

Hi  @Betwin ,

 

Create a measure instead of using filters,put the filter criteria in the measure,such as below:

Measure = IF(MONTH(MAX('Table'[Date]))=1, CALCULATE(SUM('Table'[Visitor]),FILTER('Table',YEAR('Table'[Date])=YEAR(MAX('Table'[Date]))-1&&MONTH('Table'[Date])=12)), CALCULATE(SUM('Table'[Visitor]),FILTER('Table',YEAR('Table'[Date])=YEAR(MAX('Table'[Date]))&&MONTH('Table'[Date])=MONTH(MAX('Table'[Date]))-1)))

And you will see:

Annotation 2020-08-04 104456.png

Pls note:in column chart,the values field should use the measure while in line chart use the fact table data.

 

Attached is the .pbix file if needed.

 

Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
 

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.