Forum Discussion
Need help with this model v2
- Anonymous9 years ago
Hi Fcoatis,
Sorry, it seems like I miss the the type column and only calculate the distinct value.(so the total amount not match the original amount)
Modified formula:
Table = SUMMARIZE(Allocation,[Job],[Name],[Group],[Type], "Date",LOOKUPVALUE(fMovement[Date],[Job],[Job]), "Actual Amount",LOOKUPVALUE(fMovement[Amount],[Job],[Job])*SWITCH([Group],"Doer",.3,"Handler",.7)/ COUNTX(FILTER(ALLEXCEPT(Allocation,Allocation[Name]),[Job]=EARLIER([Job])&&[Group]=EARLIER([Group])),[Group]))Regards,
Xiaoxin Sheng
Thank you once again Anonymous,
Here is a sample data detailing what I need.
https://www.dropbox.com/sh/ziioxdnfts93ahy/AAAc3x_D3BLAiIGixpwOg-lOa?dl=0
Please let me know if you need further details.
Best Regards
Hi Fcoatis,
It seems like you share the previous data table, I can't find new columns 'Nome','JOB' in sample file.
Regards,
Xiaoxin Sheng
- Fcoatis9 years ago
Post Patron
Thats right Anonymous, I translated them to english.
Can you see the model in excel?
Regards.
This link is the model in pbix.
https://www.dropbox.com/s/d3g0m8g2g4uz7c9/Allocation.pbix?dl=0
- Fcoatis9 years ago
Post Patron
Tot Allocation = VAR current_Amount = LOOKUPVALUE (fMovement[Amount];[Job]; MAX ( Allocation[Job] ) ) VAR current_Job = LASTNONBLANK ( Allocation[Job]; [Job] ) VAR current_Group = LASTNONBLANK ( Allocation[Group]; [Group] ) RETURN IF ( COUNTROWS ( Allocation) = COUNTROWS ( FILTER ( ALL ( Allocation ); [Job] = current_Job ) ); current_Amount; IF ( current_Group = "Handler"; ,7 * current_Amount / COUNTROWS ( FILTER ( ALL ( Allocation ); [Job] = current_Job && [Group] = "Handler" ) ); ,3 * current_Amount / COUNTROWS ( FILTER ( ALL ( Allocation ); [Job] = current_Job && [Group] = "Doer" ) ) ) )Ok I got the Allocation working. Now I have to scale up for names. I´m trying to grab by your example. Updated the model in the previous link.
thanks
- Anonymous9 years agoNot applicable
Hi Fcoatis,
For your scenario, I think summary table will be suitable for your requirement.
I create a summary table to store these analysed actual user amount, you can use it to create the matrix visual.
Table = SUMMARIZE(Allocation,[Job],[Name],[Group], "Date",LOOKUPVALUE(fMovement[Date],[Job],[Job]), "Actual Amount",LOOKUPVALUE(fMovement[Amount],[Job],[Job])*SWITCH([Group],"Doer",.3,"Handler",.7)/ COUNTX(FILTER(ALLEXCEPT(Allocation,Allocation[Name]),[Job]=EARLIER([Job])&&[Group]=EARLIER([Group])),[Group]))Comment:
LOOKUPVALUE(fMovement[Date],[Job],[Job]) , -look up the job date.
LOOKUPVALUE(fMovement[Amount],[Job],[Job]) - job amount
SWITCH([Group],"Doer",.3,"Handler",.7) - percent of group
COUNTX(FILTER(ALLEXCEPT(Allocation,Allocation[Name]),[Job]=EARLIER([Job])&&[Group]=EARLIER([Group])),[Group]) - current group count , used to calculate actual amount of group member.(divide)
Matrix:
Regards,
Xiaoxin Sheng