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.
Hello
I'm trying to create a calculate column of cost % out of total cost with filters, attaching the pic below for example
I have two column that filtering my calc, the right column (cost %) is what im trying to create, please note that I have a lot of month and products so creating a measure oer each one is not relevent.
thx again !
Solved! Go to Solution.
I think you forgot to write "Filter". so write it as follows:
Product_Share = 'Sales'[Total Cost (Calc)] / CALCULATE(SUM('Sales'[Total Cost (Calc)]),Filter ('Sales','Sales'[Month] = EARLIER('Sales'[Month]) && 'Sales'[Product_Group (Calc)] = EARLIER('Sales'[Product_Group (Calc)]))
* I highlight updated part*
If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.
I'm getting all 100 %
I think so, pls see below :
I think you forgot to write "Filter". so write it as follows:
Product_Share = 'Sales'[Total Cost (Calc)] / CALCULATE(SUM('Sales'[Total Cost (Calc)]),Filter ('Sales','Sales'[Month] = EARLIER('Sales'[Month]) && 'Sales'[Product_Group (Calc)] = EARLIER('Sales'[Product_Group (Calc)]))
* I highlight updated part*
If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.
You can write a column as follows and change the format as percentage:
Product_Share := Cost / calculate(sum(cost) , filter (your_table , period= earlier (period) && product= earlier (product))
If this post helps, then I would appreciate a thumbs up and mark it as the solution to help the other members find it more quickly.
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
10 | |
6 |