Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hello all!
I've been struggling with this one:
Below is an example of the tables I have:
Tables
And that's the expected result I want to achieve:
Expected calculated table
For now, I have created a calculated table with the following DAX:
Table =
CROSSJOIN(
VALUES(Employees Table[Employee_ID]),
VALUES(PPE Table[PPE])
)
With the above, I have a table with all the Employee_IDs and all the PPEs. Also, I was able to create calculated columns with another DAX expressions to lookup for Employee_Name, Function_Area and the Last Delivery Date. But yet I can't create the column that tells me if the PPE is mandatory based on that Function_Area, as per my example above.
The goal is to display which employees have their PPEs ok -- meaning they have what they need and are mandatory for 'em -- and the ones who don't.
Thanks in advance.
Hi @Anonymous
If you have this table as described:
Table1 =
CROSSJOIN(
VALUES(Employees Table[Employee_ID]),
VALUES(PPE Table[PPE])
)
you can add a column specifying whether the equipment is compulsory for that function:
Table2 =
ADDCOLUMNS (
CROSSJOIN ( VALUES ( EmployeesTable[Employee_ID] ), VALUES ( PPETable[PPE] ) ),
"IsCompulsory",
VAR currentID_ = EmployeesTable[Employee_ID]
VAR currentfunction_ =
CALCULATE ( DISTINCT ( EmployeesTable[Function_Area] ) )
RETURN
PPETable[PPE]
IN CALCULATETABLE (
DISTINCT ( PPETable[PPE] ),
PPETable[Function_Area] = currentfunction_,
ALL ( PPETable[PPE] )
)
)
Please always show your sample data in text-tabular format in addition to (or instead of) the screen captures. A screen cap doesn't allow people to readily copy the data and run a quick test and thus decreases the likelihood of your question being answered. Just use 'Copy table' in Power BI and paste it here. Or, ideally, share the pbix (beware of confidential data).
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
75 | |
54 | |
38 | |
31 |
User | Count |
---|---|
99 | |
56 | |
50 | |
42 | |
40 |