Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello,
I hope you all are doing good. I have imported a year table, that has a year column starting from 2023 to 2123 and an index column.
In power bi, I created a numeric range parameter slicer for start year. And I have created a dax measure for the end year. If you check the pbi file I attached then you will understand. The end year is basically, we are gonna consider the largest term among the 3 terms (wifia term, revenue term, and srf term) and the add the number with the starting year then we will get the end year.
But, what I need is to make a table visual with dynamic year column that will be responsive for start year measure and end year measure. Suppose, start year is 2037 and end year is 2065, then in that visual I want it to show years from 2037 to 2065.
Please check the pbi file attached.
Solved! Go to Solution.
Hi @Cortana ,
Based on your description,
Please try the following steps:
1.You can create a Calcualted table.
Table = VALUES('_YEAR'[Year])
There is no relationship between the two tables.
2. Use the following code to create a Measure.
Measure =
VAR sel_Year = SELECTEDVALUE('Table'[Year])
RETURN
IF(sel_Year >= [STARTYEAR] && sel_Year <= [ENDYEAR],
1,
0)
3. Put the Year field from Table into table visual.
Then select your visual object, put the measure in the “Filters on this visual" section, and filter it by “Measure is 1" ->Apply Filter.
Result is as below.
Best Regards,
Yulia Yan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Cortana ,
Based on your description,
Please try the following steps:
1.You can create a Calcualted table.
Table = VALUES('_YEAR'[Year])
There is no relationship between the two tables.
2. Use the following code to create a Measure.
Measure =
VAR sel_Year = SELECTEDVALUE('Table'[Year])
RETURN
IF(sel_Year >= [STARTYEAR] && sel_Year <= [ENDYEAR],
1,
0)
3. Put the Year field from Table into table visual.
Then select your visual object, put the measure in the “Filters on this visual" section, and filter it by “Measure is 1" ->Apply Filter.
Result is as below.
Best Regards,
Yulia Yan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
86 | |
76 | |
74 | |
56 | |
45 |
User | Count |
---|---|
117 | |
105 | |
77 | |
66 | |
64 |