two tables
3 TopicsDAX Calculate age between two dates on two different tables
Hi All, I have two multiple tables on a cricket dashboard and want to work out the players age at the start of a match. The first table is called "Bat" and this is what the dashboard is made up off. It has a column called start_date The other table is called "PP" and that has the player profiles detials and importnatly a date called "Born". These are linked on the data table by a player ID. I want to add to my dashboard using the daa from "Bat" an age calucalation essentially being - Born - Start Date and leaving just the age. I've looked through heaps of forums and YT videos and cant quite work it out. Really hoping someone can help. Thanks RobSolved3.6KViews0likes10CommentsMeasure using columns from two tables (not directly related)
Hello all, newbie here. It looks like I bit off more than I can chew. I have three tables. Item - list of all possible components with their specifications. Stock_item - available amount of components and Product_item - lists of components needed for assembling different products. Item has one to many relation to both Stock_item and Product_item (one beeing on Item). Sample data below. I need to calculate how many products of selected type I can manufacture from available components. So I need to divide available amount by necessary amount for every component needed for selected product and get their minimum. Sample data: Item ... S4 - 001 ... S4 - 002 ... TX - 040 ... TX - 030 ... TX - 029 ... TX - 053 ... Z4 - 013 ... TX - 044 ... TX - 038 ... TX - 042 ... TX - 034 ... TX - 033 ... TX - 058 ... TX - 084 ... TX - 003 ... TX - 076 ... TX - 033 ... TX - 058 ... TX - 060 ... D4 - 005 ... D4 - 006 ... D4 - 007 ... TX - 048 ... TX - 050 ... TX - 051 ... StockItems Amount S4 - 001 450 S4 - 002 500 TX - 040 380 TX - 053 360 Z4 - 013 150 TX - 044 100 TX - 038 250 TX - 042 360 TX - 033 150 D4 - 005 100 TX - 084 250 TX - 076 175 TX - 030 320 TX - 058 360 TX - 060 150 D4 - 006 100 D4 - 007 250 TX - 048 100 TX - 050 250 ProductItems Amount Product S4 - 001 5 A S4 - 002 3 A TX - 040 15 A TX - 030 11 A D4 - 006 2 A D4 - 007 8 A Z4 - 013 8 A TX - 044 4 A S4 - 001 8 B TX - 084 3 B TX - 040 15 B TX - 033 11 B TX - 058 8 B TX - 084 6 B TX - 003 4 B TX - 076 10 C TX - 033 5 C TX - 058 8 C TX - 060 8 C D4 - 005 4 C D4 - 006 8 C D4 - 007 5 C TX - 048 3 C TX - 050 7 C S4 - 001 8 CSolved867Views0likes2CommentsComposite Model and Direct query, loop up values from 2 tables
Question regarding Composite models I have a Direct Query Table containg tons of data - DqTable(codes, date, name, status) I have an imported table containing all the rules - RulesTable(name,status, newstatus) I want to count number of codes which satisfy all the rules Ex. DqTable: codes date name status 45852 1/2/19 ABC Completed 78513 1/3/19 DCV WIP-1 65753 1/3/19 ABC Not Completed RulesTable: name status newstatus ABC Completed C1 ABC WIP C2 ABC Not Completed C3 DCV WIP-1 C2 [name] is common and I can make a relationship. I tried to make a calculated table and failed. I tried lookup function it works good as a measure but I used SELECTEDVALUE TO Select each code - but i am not able to save the results. So i want to do it in calculated table, i want the below result date name C1 C2 C3 1/2/19 ABC 1 - - I tried this code: CalcTable: ADDCOLOUMNS(SUMMURIZE(DqTable, DqTable[date], DqTable[names]), "C1", Calculate(COUNT(DqTable[codes]), LOOKUPVALUE(RulesTable[newstatus],RulesTable[status],DqTable[status], RulesTable[name],DqTable[name]) = "C1") But i got LOOKUPVALUE function cannot be used as a Table Filter, I tried passing LOOKUPVALUE as a var, but it is not detecting DqTable[status] Its complex please try to help me and let me know if you want any details901Views0likes0Comments