The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
I have created a table as below -
The last two columns - Total stock and QN are calculated columns. They are summation of different columns.
I have a requirement to filter these last two columns on different conditions.
"Total stock" needs to be filtered on Storage location =
"QN" needs to be filtered on Storage location =
Storage location is another column in the same table.
I need to diplay this in the same table that I attached. I am trying to automate the work that is done in excel into powerBI. In excel, I could manually choose the necessary filters per column and was able to get the desired table.
I tried checking Filter function but I was not able to get the desired results. Could anyone please help.
Thank you.
Solved! Go to Solution.
New columns
Total Qty = Switch( True() ,
[ Storage location] in {"0010","0020","MDD","MDR"} , [Confirmed Qty],
blank()
)
QN = Switch( True() ,
[ Storage location] in {"ATQN",
"GGQN",
"RQTF",
"AQTF",
"ASEG"}
, [Confirmed Qty],
blank()
)
Thanks it worked. But I had to make a small change as I wanted to see the value of QN columns after filteration.
New columns
Total Qty = Switch( True() ,
[ Storage location] in {"0010","0020","MDD","MDR"} , [Confirmed Qty],
blank()
)
QN = Switch( True() ,
[ Storage location] in {"ATQN",
"GGQN",
"RQTF",
"AQTF",
"ASEG"}
, [Confirmed Qty],
blank()
)
User | Count |
---|---|
15 | |
13 | |
9 | |
6 | |
6 |
User | Count |
---|---|
27 | |
19 | |
13 | |
9 | |
5 |