We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello,
I have a table that includes the Fiscal Year (FY) field. I want to create a slicer such that when I select FY25, the data and visuals will display both FY24 and FY25. Or select FY24, display FY24 and FY23, and similarly for other years.
Data is here: (I can't attract files or links, just can capture them)
As a newcomer to Power BI, I would greatly appreciate your assistance. Thank you!
Solved! Go to Solution.
Hi @Amyries
You will need a disconnected table (without relationship) as using column from a related table will show just what's been selected and then a measure referencing that table/column to be used as a visual filter
FY Filter =
VAR SelectedFY =
MAX ( FY[FY Number] )
VAR _FY = {
"FY" & SelectedFY - 1,
"FY" & SelectedFY
}
RETURN
CALCULATE (
COUNTROWS ( 'Date' ),
KEEPFILTERS ( TREATAS ( _FY, 'Date'[Fiscal Year] ) )
)
Please see the attached sample pbix.
Hi @Amyries
You will need a disconnected table (without relationship) as using column from a related table will show just what's been selected and then a measure referencing that table/column to be used as a visual filter
FY Filter =
VAR SelectedFY =
MAX ( FY[FY Number] )
VAR _FY = {
"FY" & SelectedFY - 1,
"FY" & SelectedFY
}
RETURN
CALCULATE (
COUNTROWS ( 'Date' ),
KEEPFILTERS ( TREATAS ( _FY, 'Date'[Fiscal Year] ) )
)
Please see the attached sample pbix.
Thank you!
Hi @Amyries ,
If danextian's reply can help you, please remember to accept his reply as a solution to help the other members find it more quickly. Thank you!
Best Regards,
Dino Tao
Please accept my post as the solution.
Thank you, but I Select FY24 as the visual just show data for FY23
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 |
|---|---|
| 57 | |
| 38 | |
| 32 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 66 | |
| 66 | |
| 40 | |
| 34 | |
| 25 |