Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
JofrainVisda
Advocate I
Advocate I

Dynamic column Value

JofrainVisda_0-1742535168077.png

I have this column in powerbi, a concatenation of my FY column which is the fiscal year that consists FY24 and FY25, and Period column which consists of P1 to P12. I also created a Period Number Column that extracts the numbers in the Period Column.  So if the period is P12, the period number column on that row is 12.

I want to add another column that indicates Yes or No based on the selected value on the Period slicer in the dashboard. Please someone save me. 

Example: If I have selected P5 in the slicer, then FY25 - P5 down to FY25 - P1 rows will have "Yes" value in that new column.

7 REPLIES 7
JofrainVisda
Advocate I
Advocate I

This is what I've tried and did not work.

Created a measure:

Selected Period =
VAR SelectedVal = SELECTEDVALUE(vw_Tableau2[Period])

return
IF(SelectedVal = "P1",1,
IF(SelectedVal = "P2",2,
IF(SelectedVal = "P3",3,
IF(SelectedVal = "P4",4,
IF(SelectedVal = "P5",5,
IF(SelectedVal = "P6",6,
IF(SelectedVal = "P7",7,
IF(SelectedVal = "P8",8,
IF(SelectedVal = "P9",9,
IF(SelectedVal = "P10",10,
IF(SelectedVal = "P11",11,
IF(SelectedVal = "P12",12))))))))))))

Created a column:
Period Checker =

IF(vw_Tableau2[Current FY?] = BLANK(),"Yes",
    IF([Selected Period] = 1, "Yes",
    IF([Selected Period] = 2,
        IF(vw_Tableau2[Period Number] <= 2,"Yes"),
    IF([Selected Period] = 3,
        IF(vw_Tableau2[Period Number] <= 3,"Yes"),
    IF([Selected Period] = 4,
        IF(vw_Tableau2[Period Number] <= 4,"Yes"),
    IF([Selected Period] = 5,
        IF(vw_Tableau2[Period Number] <= 5,"Yes"),
    IF([Selected Period] = 6,
        IF(vw_Tableau2[Period Number] <= 6,"Yes"),
    IF([Selected Period] = 7,
        IF(vw_Tableau2[Period Number] <= 7,"Yes"),
    IF([Selected Period] = 8,
        IF(vw_Tableau2[Period Number] <= 8,"Yes"),
    IF([Selected Period] = 9,
        IF(vw_Tableau2[Period Number] <= 9,"Yes"),
    IF([Selected Period] = 10,
        IF(vw_Tableau2[Period Number] <= 10,"Yes"),
    IF([Selected Period] = 11,
        IF(vw_Tableau2[Period Number] <= 11,"Yes"),
    IF([Selected Period] = 12,
        IF(vw_Tableau2[Period Number] <= 12,"Yes","No"))))))))))))))

Returning result: 
regardless of the selected period, the column returns YES to all rows. Seems the the measure is not dynamically working in a calculated column

Hi @JofrainVisda 

That won't work because calculated columns and tables do not respond to slicer selections. While they can influence what is displayed in the report view, they do not dynamically change within the model. In a calculated column, SELECTEDVALUE will either return blank or the alternate result. To achieve dynamic values that respond to slicer selections, measures must be used within visuals. Additionally, a separate column in the fact Continuous Period table is needed to store the period as a number, along with a disconnected table whose column will be used in a slicer to ensure all periods remain visible. Using a column from a related table restricts the visible rows to only those selected.

danextian_0-1742548105510.png

 

Please see the attached sample pbix.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

Hi @JofrainVisda ,

Has your issue been resolved? If a community member's response addressed your query, please consider marking it as Accepted Answer and click Yes if you found it helpful.

If you have any further questions, feel free to reach out.
Thank you for being a valued member of the Microsoft Fabric Community Forum!

Hi @JofrainVisda ,

We haven’t heard back from you regarding our previous response and wanted to check if your issue has been resolved.

If it has, please consider clicking “Accept Answer” and “Yes” if you found the response helpful.
If you still have any questions or need further assistance, feel free to let us know — we're happy to help!

Thank you!

Hi @JofrainVisda ,

Just checking in @danextian @Deku has shared a response to your query regarding configuring the slicer so that it dynamically filters clients based on the date range selected in your visual.

If the provided solution helped, please consider marking it as Accepted Answer, as it may also benefit others facing a similar challenge. If you're still looking for more clarity or facing issues, feel free to share more details — we’re happy to assist further.

 

Thank you for being part of the Microsoft Fabric Community!

Calculated columns and tables are generate on semantic model refresh. Slicer selection will have no effect, on these


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!
mdaatifraza5556
Super User
Super User

Hi @JofrainVisda 

Can you please try the below DAX.

 

output =
VAR SelectedPeriod = MAX('Table'[Period Number]) 
RETURN
IF(
MAX('Table'[Period Number]) <= SelectedPeriod,
"Yes",
"No"
)

 

 

If you found this post helpful, please accept it as the solution.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors