'power bi Dividing the count value by 20
i have the following dax formula i need this formulas value to be divided to 20. As is the formula works good, i couldn't figure out to add in division to it. I appreciate any help
dax Capital_occurrance = CALCULATE(count('Price&Load'[Capital Spreads]),filter('Price&Load','Price&Load'[Capital Spreads]))
Solution 1:[1]
This don't work?
Capital_occurrance = CALCULATE(
count('Price&Load'[Capital Spreads]),
filter('Price&Load','Price&Load'[Capital Spreads])
) / 20
Solution 2:[2]
This should work. It's best to use the Divide function when Dividing to avoid dividing by zero.
dax Capital_occurrance =
DIVIDE (
CALCULATE (
COUNT ( 'Price&Load'[Capital Spreads] ),
FILTER ( 'Price&Load', 'Price&Load'[Capital Spreads] )
),
20,
1
)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Yehor Reznichenko |
| Solution 2 | zach |
