Forum Discussion
Table values are getting repeated
- 10 years ago
You should write a measure that produces the 300 regardless of the value in the rows
denominator =calculate(sum(table[gross sales]),all(table[cus]))
then write a measure
=sum(table[gross sales])/denominator
You really shouldn't be creating these as columns, even from the query editor. Your last 2 should be written as measures. Read about it here. http://exceleratorbi.com.au/calculated-columns-vs-measures-dax/
Your problem is strange. What is the join between the customer table and this data table?
- Anonymous10 years agoNot applicable
Thanks for the reply MattAllington.
I created it as measure using sum funtion .
But i got NaN and Infinity values i tried if condition there
if (divisor = 0,0,division expression)
but the thing is , it is taking very long cus um working in direct query mode.
and dont know y i got an extra empty row with 0.00% value for the calculated column and all other column values as empty at the start of the table just after the headers...!!(Please look at the image i attached)
is there any alternative there to replace Infinity and Nan values in table
- MattAllington10 years agoCommunity Champion
There is an inbuilt DIVIDE function that handles divide by zero errors.
=DIVIDE(numerator,denominator)
- Anonymous10 years agoNot applicable
Thank u.
Can u please help me out with this too..?
Gross Sales is there and i wanna do following calculation
Cus Gross sales new_column(Gross Sales / Total Gross Sales)
1 100 100/300
2 200 200/300
Total 300
How um i suppose to use total of gross sales column in measure calculation..??