Forum Discussion
srineshnisala
3 years agoFrequent Visitor
How to create single select slice but using multiple conditions
We are converting a Jasper Report to Power BI. In the Jasper report, user can select "Customer Type" filter that has "Active" and "All" values. Based on the selected filter, the data will be displaye...
lbendlin
3 years agoSuper User
Power BI does not support OR filters across columns. You would need to write a measure that implements the desired logic and then use that measure as a visual filter.
srineshnisala
3 years agoFrequent Visitor
I'm guessing I'm in the right path. However, I have an issue testing if the enddate in the current row is blank or not.
Measure =
VAR StartDate = FIRSTDATE(CustomersPlan[startdate])
VAR EndDate = LASTDATE(CustomersPlan[enddate])
RETURN
IF(CustomersPlan[enddate] = BLANK(), "Active", "All")
^^^^^^^^^^^^^^^^^^^^^A single value for column 'enddate' in table 'CustomersPlan' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
Do you have any idea how to refer the current row value of a date type in a measure?
- lbendlin3 years agoSuper User
Do you have any idea how to refer the current row value of a date type in a measure?Great question. This is the foundation of DAX, the difference between row context and filter context.
Use an aggregate as suggested by the message.