I'm trying to perform the easiest process in Excel where you take several measures and put them together into one table like this:
The first Total in column P is a measure with this code:
NoTRSDerTotal = VAR MinXShift = [Sum MinLab] * [Count Num Days] RETURN DIVIDE( [Sum MinNoTRSDer], MinXShift )
where NoTRSDerTotal is the number of minutes the manufacturing machine was not operating divided by the total minutes per shift.
MinLab are the total working minutes per shift, or the working hours per shift * 60:
Sum MinLab = SUM(HorasxTurno[MinLaborables])
CountNumDays is the number of days where there were operations.
MinNoTRSDer are the number of minutes the manufacturing machine was not operating due to a failure, which are classified with the code NoTRSCode that can be AMOL, AP, CM, PO, PP.
Then, I have two additional measures:
TRSDer% = DIVIDE( CapturaProduccion[TUDer], [Sum Horas Laborables] * [Count Num Days] )
where TRSDer% is the coefficient of TUDer divided by the total hours per shift times the number of working days.
TUDer = SUMX(CapturaProduccion, DIVIDE( [Sum PzProdBuenasDer], CapturaProduccion[PzObjDer] ) )
_NoCal%Der = DIVIDE( SUMX(CapturaProduccion, DIVIDE( [Sum PzScrapDer], CapturaProduccion[PzObjDer] ) ), [Sum Horas Laborables] * [Count Num Days] )
where NoCalDer divides the total bad pieces by the target number of pieces per shift as numerator, and divides this by the total number of hours per shift times the number of working days.
What I need is to show all in one table to add them up and show as a visual in a chart.
Now I just have them sitting in two different tables in PBI:
I know it looks a bit complicated but in excel is so easy. Here I'm really struggling to think on a solution.
Here is my pbix file.
I appreciate a lot any help on this.
Solved! Go to Solution.
Hi @calerof ,
I would say it's easy in Power BI as well. 🙂
So measures are never at a table/dataset level. They are at a data model level. You can access any measure from any table in other table.
So basically, in TABLE1 you can create a measure that adds up all the measures coming from TABLE2 and from TABLE3.
Hope this helps.
Hi @Pragati11 ,
Thanks for your response. But I need the granularity, I need to show basically each column from the first table, i.e. NoTRS with each category: AMOL, AP, CM, etc, and TRS and NoCAL, and then the Grand Total.
I think you want to show two matrix visuals in one like Excel.
You can build a new table (By merge)then pivote them or build five measures (AMOL, AP, CM, PO, PP and add these measures like NoTRSDerTotal, TRSDer% into values in matrix).
You may refer to this post: How to Subtract Data From Same Column In Imported Table When Put In Matrix?
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.