Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi folks,
I just read the following article (http://community.powerbi.com/t5/Community-Knowledge-Base/Calculated-Column-Table-Change-Dynamically-...) which makes me believe what I am trying to do is not possible but nevertheless, I'll ask 🙂
I have one table (Transactions) with multiple transactions which include 11 columns with different possible manufacturers, a "Total Price" for each line and a transaction date.
I have another table (Manufacturer) where I have a distinct list of all manufacturers and I'd like to have against them, a sum of the "Total Price" to plot. The catch is that I'd like to use the Transaction Date of the first table as a slicer, and after hours of trying, I'm close to giving up.
At the moment, my calculated column is based on the following:
Total Spend = CALCULATE (
SUM(Transactions[TOTAL PRICE]),
FILTER(Transactions,Transactions[Related Manufacturer 1]=Manufacturer[Manufacturer]||Transactions[Related Manufacturer 2]=Manufacturer[Manufacturer]||Transactions[Related Manufacturer 3]=Manufacturer[Manufacturer]||Transactions[Related Manufacturer 4]=Manufacturer[Manufacturer]||Transactions[Related Manufacturer 5]=Manufacturer[Manufacturer]||Transactions[Related Manufacturer 6]=Manufacturer[Manufacturer]||Transactions[Related Manufacturer 7]=Manufacturer[Manufacturer]||Transactions[Related Manufacturer 8]=Manufacturer[Manufacturer]||Transactions[Related Manufacturer 9]=Manufacturer[Manufacturer]||Transactions[Related Manufacturer 10]=Manufacturer[Manufacturer]||Transactions[Related Manufacturer 11]=Manufacturer[Manufacturer]
)
)
Does anyone have any clever idea on how to filter the amount this calculation returns based on a slicer for a date on table1?
Hi @Anonymous
Since a calculated column can't be changed by a slicer, could you consider using measures instead?
Best Regards
Maggie
Hi Maggie,
Yes completely but I am unable to convert the column formula I have in my first post into a measure? I am effectively testing whether my manufacturer number appears in any of the 11 columns. I also have one column that agreggates all columns (with "//" as a delimeter) but can't integrate a search or find within a measure 😞
Hi @Anonymous
What are your tables like?
I create an example, is it right?
table1
table2
I am testing, if i have misunderstood you, please let me know in time.
Best Regards
Maggie
Hello,
I have found a solutiuon after reading a new book on PBI 🙂
I used the unpivot column function in my original table and duplicated all lines, with one new column showing each singular value.
My lookup was then used on this specific column and all functionalities worked.
Thanks everyone and Maggie for your assistance 🙂
OF
User | Count |
---|---|
139 | |
113 | |
103 | |
73 | |
63 |
User | Count |
---|---|
136 | |
125 | |
107 | |
70 | |
61 |