Forum Discussion
Koy
1 year agoHelper I
Help with Sorting
Trying to sort a column Line Item by Line Item Sort as shown below. Getting an error message and I just can't see why ... I don't see any duplicates Running a similar table and it wor...
- 1 year ago
I did a reboot, and now it works as expected. Didn't change anything, so was glitchin the martrix for a bit I guess.
lbendlin
1 year agoSuper User
Is that first Line Item a BLANK() or an empty string?
Koy
1 year agoHelper I
Using it to make a table like the below using measures like this
Gross to Net OL =
VAR _disc = CALCULATE(SUMX('1_BPC','1_BPC'[FIN_DATA]),'5_AcctRef'[Account Number]="6541303") / [FX]
RETURN
switch(SELECTEDVALUE('Gross to Net'[Category]),
"Gross Sales",
if(HASONEVALUE('Gross to Net'[Line Item]),
Switch(SELECTEDVALUE('Gross to Net'[Line Item]),
"Discount",format(_disc / [Units] *1000,[format2]),
"Buydown",format([BD]/[Units]*1000,[format2])
),format([GS] / [Units]*1000,[format2])
),
"Price, net",
if(HASONEVALUE('Gross to Net'[Line Item]),
Switch(selectedvalue('Gross to Net'[Line Item]),
"Key Acct",format([KA]/[Units]*1000,[format2]),
"SMP",format([SMP]/[Units]*1000,[format2]),
"Coupon",format([Coup]/[Units]*1000,[format2]),
"WHS Terms",format(([To Customer] - _disc)/[Units]*1000,[format2]),
"Retail Prgm",format([To Store]/[Units]*1000,[format2]),
"FET",format([FET]/[Units]*1000,[format2])
),format(([GS]+[BD]+ _disc) / [Units] *1000,[format2])
),
"Net Revenue",format([NR]/[Units]*1000,[format2])
)