Forum Discussion
countif function excel replication powerbi dax measure
Hello Greg,
Can you please re-write this formula exactly: Here the Cust_Segment & product_Type columns are from the SOL_Adherence table and Actual_SOL_Wk, PTS_Wk and Actual PTS_Wk are from PTS_Adherence table. [Week of] is a Measure. Week of is under newly created Measures Table.
I previously wrote something like this:
PD Not Finished Play 4 is showing errors like this:
MdxScript(Model) (28,32) Calculation error in measure 'Measure Table'[Day of] : A table of multiple values
was supplied where a single value was expected.
[Day of] and [Week of] were defined as below and they belonged to a different table named Distinct Date
Hello,
Can you at least help me understand the errors?
PD Not Finished Play 4 is showing errors like this:
MdxScript(Model) (28,32) Calculation error in measure 'Measure Table'[Day of] : A table of multiple values
was supplied where a single value was expected.
Greg_Deckler Amit amitchandak lbendlin DataInsights speedramps johnt75 davehus Ashish_Mathur
- Greg_Deckler3 years ago
Community Champion
Anonymous The error you are getting means that somewhere in your formula you are returning a table of values when DAX is expecting a scalar (single value).
Over the years, I've learned this lesson. It's mostly a waste of time to try to answer complex calculation issues without sample data. It's just too hard to get the DAX correct and the visual configuration correct, etc. This is what is important:
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.Otherwise, it's just not efficient and there are a million variables involved as to why things won't work the way you want.