Forum Discussion
Anonymous
4 years agoNot applicable
Multiple different aggregations within the same column
Hi all,
I believe I have a unique challege on how to show something:
- Measure slicer:
- Measure A (SUM)
- Measure B (SUM)
- Measure C (SUM)
- Measure D (DIVIDE)
- Unit of Measure slicer:
- Dollars
- Euros
- Local Currency
And as an example, each measure (A, B, C, D) can have their corresponding units of measure. For example, measure A can be in Dollars, Euros and Local Currency, measure B, C, D as well (basically a cartisian join).
This is how the data looks like in fact table:
| week_id | measure_name | measure_value |
| 1 | measure A in Dollars | 9 |
| 1 | measure A in Euros | 32 |
| 1 | measure A in Local Currency | 93 |
| 1 | measure B in Dollars | 12 |
| 1 | measure B in Euros | 61 |
| 1 | measure B in Local Currency | 45 |
| 2 | measure A in Dollars | 26 |
| 2 | measure A in Euros | 72 |
| 2 | measure A in Local Currency | 19 |
| 2 | measure B in Dollars | 73 |
| 2 | measure B in Euros | 65 |
| 2 | measure B in Local Currency | 7 |
Dimensional tables are connected (one - to - many) to fact table like shown here (sorry for blacking out the data 🙂 😞
Visualtion has to look like following:
Now, I have following question:
- How do I make a SINGLE measure that will either DIVIDE or SUM
- for example, if Measure A is selected, measure should SUM, and if Measure A and measure D is selected, measure should SUM and DIVIDE
Hopefully, I have explained it clearly enough. 🙂
Thank you all!
1 Reply
- tamerj1Community Champion
Hi Anonymous
Sum what and divide what? Please give a caculation example.