Forum Discussion
Multiply Values from Single Column
Hello folks,
Hopfully, a simple one. I have column of odds by categories and location. The user can filter by category and location and I wan't to divide the remaining values together for a pooled odds ratio. How do you divide (or even mutiply) all vlaues in a single column togehter? In the below table the answer should be 3.47 = 1.36/3.23/2.64/0.41/0.12
| Location | Category | Ratio |
| UK | Fatigue | 1.36 |
| UK | Head Ache | 3.23 |
| UK | Sweating | 2.64 |
| UK | Nausa | 0.41 |
| UK | Swelling | 0.12 |
I thought [Ratio] is a measure
otherwise no need to summarize just
= PRODUCTX ( 'Table', 1 / 'Table'[Ratio] )
17 Replies
- Greg_DecklerCommunity Champion
jbaisley Hmm... DAX has a PRODUCTX function to multiply a column of numbers together but no equivalent DIVIDEX function that I am aware of. Will think on this. Also, I get 3.24 dividing all of those numbers.
- jbaisleyHelper I
Thanks Greg_Deckler you are correct re: the 3.24 (long day). I will take a look at PRODUCTX.
- Greg_DecklerCommunity Champion
tamerj1 I went down that path. The syntax is broken, can't pick [Ratio] out of a summarized column that doesn't include it. Also, PRODUCTX('Table',1/[Ratio]) is equivalent and that returns 1.75.
- jbaisleyHelper I
I have returned for advice on extending this function! Suppose I have a slicer for the symtopms in the first post. How can I filter the Odds[Ratio] to the selected values of Odds[Category]?