Forum Discussion
Anonymous
3 years agoNot applicable
countif function excel replication powerbi dax measure
I need help with replicating the countifs function in Excel to DAX measures in PowerBI: Filter Cust_Segment, Filter product_Type WHERE Actual_SOL_Wk <= Week Of AND PTS_Wk < WeekOf AND Actual_PTS_...
Anonymous
3 years agoNot applicable
Trial 7 = CALCULATE(CALCULATE(COUNTA(SOL_Adherence[product_type]),COUNTA(SOL_Adherence[Customer_Segment])),SOL_Adherence[Actual_SOL_Wk] <= SELECTEDVALUE('Distinct Date'[Week Of].[Date]),PTS_Adherence[PTS_Wk].[Date]< SELECTEDVALUE('Distinct Date'[Week Of].[Date]),PTS_Adherence[Actual_PTS_Wk].[Date]>SELECTEDVALUE('Distinct Date'[Week Of].[Date]))
Hello, I am having one last error in the query above: It is saying:
Error: The True/False expression does not specify a column. Each True/False expressions used as a table filter expression must refer to exactly one column.
Can you please help me fix this error? My main issue is how do I count both the Customer Segment & Product Type together using the condition outlined above. I can only count Customer Segment or Product Type but DAX formula does not let me count both. Why is this?
- Anonymous3 years agoNot applicable
Greg_Deckler amitchandak can you please help me resolve this error?
- Anonymous3 years agoNot applicableTrial 7 = CALCULATE(CALCULATE(COUNTA(SOL_Adherence[product_type]) && COUNTA(SOL_Adherence[Customer_Segment])),SOL_Adherence[Actual_SOL_Wk] <= SELECTEDVALUE('Distinct Date'[Week Of].[Date]),PTS_Adherence[PTS_Wk].[Date]< SELECTEDVALUE('Distinct Date'[Week Of].[Date]),PTS_Adherence[Actual_PTS_Wk].[Date]>SELECTEDVALUE('Distinct Date'[Week Of].[Date]))I used the && operator to fix this issue, but instead of returning a number like 4500 its returning True in the 123 card.