The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have a table with unique local id's, local text, values, standardized ID's, and standardized text that looks like this:
local ID | local Text | value | std ID | std Text |
123 | Ibuprofen | 15 | AAA | IBUPROFEN |
456 | Advil | 4 | AAA | IBUPROFEN |
789 | Motrin | 0 | AAA | IBUPROFEN |
111 | Amoxil | 3 | BBB | AMOXICILLIN |
222 | Trimox | 5 | BBB | AMOXICILLIN |
333 | Amoxicillin | 7 | BBB | AMOXICILLIN |
444 | E.E.S. | 6 | CCC | ERYTHROMYCIN |
I'm trying to populate two fields in a different table, 'sum of value' and 'running total' for values grouped by the 'std ID' so it looks like this:
std ID | std Text | sum of value | running total |
AAA | IBUPROFEN | 19 | 19 |
BBB | AMOXICILLIN | 15 | 34 |
CCC | ERYTHROMYCIN | 6 | 40 |
I've found answers to MANY of my questions in this forum in addition to very useful techniques that I didn't think possible, but have not found this situation addressed.
Solved! Go to Solution.
would this article help?
https://www.sqlbi.com/articles/userelationship-in-calculated-columns/
Proud to be a Super User!
What a simple solution that works so well! Using 'RELATEDTABLE' worked to access the 'value' info from another table. For posterity, the sample code on the linked page is:
DimDate[OrderSales] = SUMX ( RELATEDTABLE( FactInternetSales ), FactInternetSales[SalesAmount] )
where '[OrderSales]' was replaced by a new column name in my new table, 'FactInternetSales' was replaced by my old table name, and '[SalesAmount]' was the column in the old table that held the values I was interested in collating. To add a running total, I used info from this link: https://community.powerbi.com/t5/Desktop/Cumulative-Total/td-p/43115.
would this article help?
https://www.sqlbi.com/articles/userelationship-in-calculated-columns/
Proud to be a Super User!
What a simple solution that works so well! Using 'RELATEDTABLE' worked to access the 'value' info from another table. For posterity, the sample code on the linked page is:
DimDate[OrderSales] = SUMX ( RELATEDTABLE( FactInternetSales ), FactInternetSales[SalesAmount] )
where '[OrderSales]' was replaced by a new column name in my new table, 'FactInternetSales' was replaced by my old table name, and '[SalesAmount]' was the column in the old table that held the values I was interested in collating. To add a running total, I used info from this link: https://community.powerbi.com/t5/Desktop/Cumulative-Total/td-p/43115.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
82 | |
62 | |
54 | |
51 |
User | Count |
---|---|
127 | |
118 | |
81 | |
65 | |
64 |