Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all, I am new in using PowerBI and would appreciate some advise on the current issue I am facing,
I have a table that contains the following information:
Part No. Parent Part Group Latest Date Practiced Training
100 A 14-May-2020 No
200 B 20-Aug-2018 Yes
101 A
300 C
201 B 18-Jul-2021 No
As from the table above, a Parent Part Group has multiple part numbers within it, and the training represents if a specific person requires training for that particular part number (No if its within 2 years of the Latest Date Practiced from today, else yes).
The condition I need to fill the training column with is:
1. Since there is at least one part number that do not require training, then all part numbers within the same parent part group do not require training (See Parent Part Group B and A)
2. If there is no latest date practiced for the part number, then it requires training. (See Parent Part Group C)
Ultimately the result will look like the following table:
Part No. Parent Part Group Latest Date Practiced Training
100 A 14-May-2020 No
200 B 20-Aug-2018 No
101 A No
300 C Yes
201 B 18-Jul-2021 No
Hope my example is clear enough.. Thank you so much! 🙂
Solved! Go to Solution.
@Anonymous Sorry, that line should be:
MAXX(__Dates,[Latest Date Practiced) = BLANK(),"Yes",
Dear @Greg_Deckler
Thank you for your solution however I am getting an error message of:
"The MAX function only accepts a column reference as an argument"
@Anonymous Sorry, that line should be:
MAXX(__Dates,[Latest Date Practiced) = BLANK(),"Yes",
@Anonymous Maybe:
Training 1 Column =
VAR __ParentPartGroup = [Parent Part Group]
VAR __Training =
DISTINCT(
SELECTCOLUMNS(
FILTER(ALL('Table'),[Parent Part Group] = __ParentPartGroup)
"Parent Part Group",[Parent Part Group]
)
)
VAR __Dates =
DISTINCT(
SELECTCOLUMNS(
FILTER(ALL('Table'),[Parent Part Group] = __ParentPartGroup)
"Latest Date Practiced",[Latest Date Practiced]
)
)
RETURN
SWITCH(TRUE(),
"No" IN __Training,"No",
MAX(__Dates) = BLANK(),"Yes",
"Yes"
)
User | Count |
---|---|
73 | |
70 | |
38 | |
25 | |
23 |
User | Count |
---|---|
96 | |
93 | |
50 | |
43 | |
42 |