Forum Discussion
34583458hhdnsk
1 year agoFrequent Visitor
New Column Creation Help
My data is structured like so: In the Data column I have different labels such as PV, Number of Cards, etc. I would like to create a new data field titled: Spend per Card where it...
- 1 year ago
you can try to create a measure for this
Measure = DIVIDE(sumx(FILTER('Table','Table'[Data]="PV"),'Table'[Number(USD)]),sumx(FILTER('Table','Table'[Data]="Number of Cards"),'Table'[Number(USD)]))for JPY you can create a similar measure to get the speedpls see the attachment below
ryan_mayu
1 year agoSuper User
your screenshot is too small. could you pls paste your sample data here and also provide the expected output?
- 34583458hhdnsk1 year agoFrequent Visitor
ryan_mayu Here is some sample data:
Table I have
Account Time Number (JPY) Data 123 Q1 50 PV 123 Q2 60 PV 123 Q1 10 Number of Cards 123 Q2 20 Number of Cards Table I want:
Account Time Number (JPY) Data 123 Q1 50 PV 123 Q2 60 PV 123 Q1 10 Number of Cards 123 Q2 20 Number of Cards 123 Q1 5 (50/10) Spend per card 123 Q2 3 (60/20) Spend per card - ryan_mayu1 year agoSuper User
in PQ,
1. select the Data column and pivot column
2. create speed column
3. select the last 3 columns and unpivot column
4. renname column name
pls see the attachment below
- 34583458hhdnsk1 year agoFrequent Visitor
When I pivot column it looks like this and i think this is the problem:
Account Time PV Number of Cards 123 Q1 50 null 123 Q2 60 null 123 Q1 null 10 123 Q2 null 20