Forum Discussion
Parameter in Calculated column
- 6 years ago
Hi, Anonymous
A measure will reflect the selection of the slicer in time, and the column is refreshed only after loading and clicking the Refresh button, and can't be interacted with other visual. I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
Calendar(a calculated table):
Calendar = CALENDARAUTO()There is no relationship between two tables. You create a meaure like below.
Result = var _parameterstartdate = CALCULATE( MIN('Calendar'[Date]), ALLSELECTED('Calendar') ) var _parameterenddate = CALCULATE( MAX('Calendar'[Date]), ALLSELECTED('Calendar') ) return IF( _parameterstartdate<SELECTEDVALUE('Table'[StartDate])&& _parameterenddate>SELECTEDVALUE('Table'[EndDate]), "Yes","No" )Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , Where do you need that.
In measure
Grand Total Orders for Selected Date Range =
var _max = maxx(allselected(Date),Date[Date])
var _min = minx(allselected(Date),Date[Date])
return
Calculate([Measure],filter(ALL(Date),Date[Date]<_min && PerformanceTable[Date]>_max))
Use a date table
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184
Appreciate your Kudos.
- Anonymous6 years agoNot applicable
- amitchandak6 years agoSuper User
Anonymous , You can not pass the slicer parameter to calculated columns. So think the term of measure only