Forum Discussion
Comparing values from different tables
Yes, for specific product. In my excel file I have it as:
VLOOKUP=([@Product Code],Table5[#ALL],3,FALSE)
I want to do the same thing across 2 tables in Power BI.
Sorry if I am making this more difficult than it needs to be. I am new to Power BI.
Hi habaholic
| I want to do the same thing across 2 tables in Power BI |
If I understood it correctly the best cycle time of a product is the lowest cycle time. So if you create a measure for 2015 and 2017 like this:
BestCycleTime2015 = MIN('2015'[Cycle Time])
and
BestCycleTime2017 = MIN('2017'[Cycle Time]) and after that you create a measure that divides 2017 with 2015
BestCycleTime2017 divided by BestCycleTime2015 =
DIVIDE('Table1'[BestCycleTime2017]; '2015'[BestCycleTime2015])And you set that measure to % format.
After that you can add a slicer where you can select the product you want to compare.
Let me know if this works :)
Regards,
L.Meijdam
- habaholic8 years agoFrequent Visitor
OK. One issue, I don't want to compare Best Time 2017 vs Best Time 2015. What I want to do is compare my current production cycle time vs the Best Time 2015 for the same product. If the product was not produced in 2015 then return no value.
I think your suggestion for the BestCycleTime2015 is OK. But then I need to compare individual production runs from 2017 against this time, and then calculate a total for the month across all products produced.
- Zubair_Muhammad8 years agoCommunity Champion
Try this measure in Table 2017
= IF ( HASONEVALUE ( Table2017[Product] ), DIVIDE ( SUM ( Table2017[Cycle Time] ), CALCULATE ( MAX ( Table2015[Cycle Time] ), FILTER ( Table2015, Table2015[Product] = VALUES ( Table2017[Product] ) ) ) ) )