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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Nishant77Goel
Frequent Visitor

use select field parameter value to create a column

I have created a field parameter with 4 different dates using modelling tab. Based on selection in field parameter I want to create a column that flags date (YES/ NO) falling in last 180 days from today and use this filter in creating a column chart view. 

3 REPLIES 3
Nishant77Goel
Frequent Visitor

Selected Parameter = maxx(filter('Date Value', 'Date Value'[Date Value Order] = SELECTEDVALUE('Date Value'[Date Value Order])), 'Date Value'[Date Value Fields])


based on the selected Parameter wants to calculate last 180 days on that column.

Last 180 days = IF([Selected Parameter] > (TODAY()-180),"1","0")
This is giving error that the values/ Format are not matched one is date and other is text

 

Hi @Nishant77Goel 

 

Please check the format of your "Selected Parameter", if it is a text, try to use FORMAT function or Power Query to convert it to date.

If this can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,
Community Support Team _ xiaosun

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Nishant77Goel , In both these blogs I have discussed how to get selected value

Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f
Field Parameters- Conditional Formatting: https://amitchandak.medium.com/field-parameters-conditional-formatting-517aacc23fdf

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.