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.
I have a CAGR calculation that uses parameters of Number of months to base the rate calculation, and Number of future months to plot the forecasted revenue. How do I use these paraments to filter the page and/or visual to only show the X number of past months and X number of future months in the chart?
I do have a date table, but the parameter table does not link to it. The filter of the visual does not accept a measure (measure is used to capture the value entered in the parameter). Any ideas?
Solved! Go to Solution.
Hi @steph_io,
For your scenario, you can refer to below steps to filter based on slicer.
1. Create a parameter table to store month number.
2. Write a measure to check the current records based on filtered data range, then add tag to mark this record.
Tag = VAR selected = SELECTEDVALUE ( 'Para Table'[Number] ) VAR current_date = MAX ( 'Table'[Date] ) RETURN IF ( current_date >= DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) - selected, DAY ( TODAY () ) ) && TODAY () <= DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) + selected, DAY ( TODAY () ) ), 1, 0 )
3. Drag this measure to visual level filter.
Result: previous 1 month to next 1 month
Notice: above measure will filter the date range previous X month to next X month.(X based on slicer)
Regards,
Xiaoxin Sheng
Hi @steph_io,
For your scenario, you can refer to below steps to filter based on slicer.
1. Create a parameter table to store month number.
2. Write a measure to check the current records based on filtered data range, then add tag to mark this record.
Tag = VAR selected = SELECTEDVALUE ( 'Para Table'[Number] ) VAR current_date = MAX ( 'Table'[Date] ) RETURN IF ( current_date >= DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) - selected, DAY ( TODAY () ) ) && TODAY () <= DATE ( YEAR ( TODAY () ), MONTH ( TODAY () ) + selected, DAY ( TODAY () ) ), 1, 0 )
3. Drag this measure to visual level filter.
Result: previous 1 month to next 1 month
Notice: above measure will filter the date range previous X month to next X month.(X based on slicer)
Regards,
Xiaoxin Sheng
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |