Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hello,
I had a requirement to create a chart which would give 3 years based on user selection (so user selects 05.2018 and I got axis of 05.2016, 05.2017, 05.2018 etc). for that purpose I had to create 2nd calendar without connection to anything to let it be an axis, and the measure is
Solved! Go to Solution.
Hello,
My solution to that is just to REMOVEFILTERS from entire calendar table, not only column Year and/or month so REMOVEFILTERS('Calendar') solves the problem
Hi @Pbiuserr ,
I created a sample pbix file(see attachment) for you, please check whether that is what you want.
1. Create one calendar table
2.Create a measure as below:
Measure =
VAR _selym =
SELECTEDVALUE ( 'Calendar'[YearMonth] )
VAR _year =
VALUE ( LEFT ( _selym, 4 ) )
VAR _month =
VALUE ( RIGHT ( _selym, 2 ) )
RETURN
CALCULATE (
SUM ( 'Table'[Sales] ),
FILTER (
'Table',
YEAR ( 'Table'[Date] ) <= _year
&& YEAR ( 'Table'[Date] ) >= _year - 2
&& MONTH ( 'Table'[Date] ) = _month
)
)
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hello,
My solution to that is just to REMOVEFILTERS from entire calendar table, not only column Year and/or month so REMOVEFILTERS('Calendar') solves the problem
The issue is the REMOVEFILTERS - that is clearing all filters across all tables, so its ignoring any slicers. As you said that your new table isn't connected to anything else then it wouldn't be filtering anything else, you may be able to remove the REMOVEFILTERS altogether.
If there are specific tables or columns you want to remain as active filters then you could specify them in ALLEXCEPT calls, or if there are specific tables from which you do want to remove filters then specify those inside the REMOVEFILTERS
So it would be like
@Pbiuserr - The REMOVEFILTERS will remove filters. Consider changing to REMOVEFILTERS( 'Calendar'[Year],'Calendar'[Month] )?
REMOVEFILTERS( 'Calendar'[Year],'Calendar'[Month] ) or just REMOVEFILTERS( 'Calendar'[Year]) makes chart filter only selected period on filter (not giving years back)
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 43 | |
| 39 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 68 | |
| 63 | |
| 31 | |
| 30 | |
| 23 |