Forum Discussion
cs7238
4 months agoRegular Visitor
How can I create a calculator that pulls values from two table visuals?
I have a data table that breaks down different mock food products by their recipes and the percent contribution of each ingredient to each the recipe. Here is a snippet of what this table looks like ...
- 4 months ago
Hi cs7238,
I was able to reproduce your scenario using sample data and achieved the expected similarity calculation.
I’ve attached the PBIX file for your reference
Thank you.
.
pcoley
Super User
4 months agoI understand you're looking to work with ingredient percentages in your data.
Here are two approaches:
1. **Pre-processing:** If possible, transform your data before loading it into Power BI. Split the "Percent Contribution" column into individual ingredient and percentage columns. This will make direct DAX calculations much simpler.
2. **DAX for Unpivoting (More Advanced):** If you can't pre-process, you might consider a DAX approach using `UNION` and calculated columns to unpivot your data, but this can become complex.