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 work order table which has work order ids, date reported,status, etc. On basis of that created a forecast table for next 3 years.
I need to show the goal i.e., through button drillthrough, I had merged boh current and forecast tables into a single one.
I created a date table i.e., with min of date reported from current table and max of next date reported column from the forecast table.
created a date slicer based on date table and values of date slicer are current year, next year, curret quarter like that...
If I select current year , the goal is showing only current year data upto current work orders and forecast data in the current year...
The requirement is if i select current year, along with current year work order , it should display current year forecast and along with next 2 years forecast data for the particular work orders i.e, along with 2024, next two years 2025 and 2026 forcast data also should show...
Please help me on this..
Thanks
To meet your requirement, follow these steps:
1. **Create a Date Slicer
Ensure the date slicer uses the Date table which includes the full range from the minimum date in the current table to the maximum date in the forecast table.
2. Adjust the Date Slicer Logic
Create a measure to handle the logic of displaying data for the current year and the next two years when the current year is selected.
3. Create a Custom Measure
Use a DAX measure to check if the selected date is in the current year and then include the forecast for the next two years.
```DAX
SelectedYear = YEAR(TODAY())
DisplayData =
IF (
YEAR(MAX(DateTable[Date])) = SelectedYear,
CALCULATE (
SUM(MergedTable[Value]),
YEAR(MergedTable[Date]) IN {SelectedYear, SelectedYear + 1, SelectedYear + 2}
),
SUM(MergedTable[Value])
)
```
4. Use the Measure in Your Visualization
Replace the existing measure in your visuals with `DisplayData`.
5. Test the Slicer
Ensure that selecting the current year in the slicer shows data for the current year along with the forecast for the next two years.
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 | |
| 33 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 68 | |
| 66 | |
| 41 | |
| 34 | |
| 24 |