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 August 31st. Request your voucher.
Hi there ;
Could ypu pls help me to create a new table about below issue ;
I have table A as below which includes "Material", "Delivery Date " and " Quantity" :
We will createa a new table , and in thşs table we will sum of the qty of the materials based on a date filtering , for new table rules will be like that :
So after these rules , i want a calculated table as below :
Also i share with you excel source with below link :
https://drive.google.com/file/d/1apdTMsR2j2tnd0rzPLCEcb-iIoLSxsYm/view?usp=sharing
Thanks in advance for your kind supports
Solved! Go to Solution.
Hi @erhan_79 ,
According to your request, I have done the following test for reference. The calculated column is created for dynamic calculation. If the current month is February, the sum value corresponding to Material is "100".
C =
CALCULATE (
SUM ( 'Table'[Quantity] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Material] = EARLIER ( 'Table'[Material] )
&& 'Table'[Delivery Date] <> BLANK ()
&& (
'Table'[Delivery Date] <= TODAY ()
|| (
'Table'[Delivery Date] > TODAY ()
&& MONTH ( 'Table'[Delivery Date] ) = MONTH ( TODAY () )
)
)
)
)
If the problem is still not resolved, please provide detailed error information and let me know immediately, looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @erhan_79 ,
According to your request, I have done the following test for reference. The calculated column is created for dynamic calculation. If the current month is February, the sum value corresponding to Material is "100".
C =
CALCULATE (
SUM ( 'Table'[Quantity] ),
FILTER (
ALLSELECTED ( 'Table' ),
'Table'[Material] = EARLIER ( 'Table'[Material] )
&& 'Table'[Delivery Date] <> BLANK ()
&& (
'Table'[Delivery Date] <= TODAY ()
|| (
'Table'[Delivery Date] > TODAY ()
&& MONTH ( 'Table'[Delivery Date] ) = MONTH ( TODAY () )
)
)
)
)
If the problem is still not resolved, please provide detailed error information and let me know immediately, looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@erhan_79 I don't see any reason to create a table or column when the above result can be easily achieved using the measure (as per my solution). There has to be a strong reason why someone needs a calculated column or calculated table in the model, and visualization is not a very strong reason. Just my 2 cents.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Answer is given in this file. Let me know if that suffice.
Proud to be a Super User!
dear @VijayP
thanks for your reply but i wonder something , in your actual quantity formula you mentioned " today" as i marked yellow. for example today was 01.02.2021 , and then actual month will be february , if there will be in the delivery date 05.02.2021 tomorrow's report system should calculate too.But when you write the formula Today() , i could not be sure that you considered only date of today or all whoe month of january, also i can not test this situation because today is the last day of january .
maybe more clear like that to tell , imagine that today 30.01.2021 , and you sent me this formula and i changed the one of the delivery date to 31.01.2021 , so system will consider that changed date to 31.01.2021 's Lines's too ?
Instead of Today you can use Month(Delivery DAte) > Month(Today()) to avoid such issues.
Proud to be a Super User!
ok @VijayP , but when we do like that then previous years are not calculated , for previous years we need to add something too ,
@VijayP ,
i try to tell that actual month is dynamic , when i open report in february actual month will be february , so all the delivery dates in february from 1 to 29 february will be the actual month statu whenever i check the report in february
@erhan_79 solution attached, if a date is selected in the slicer, it will sum qty on or before that date, if no date is selected then it will use TODAY() date.
You can tweak this solution as you see fit.
Check my latest blog post Compare Budgeted Scenarios vs. Actuals I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@erhan_79 why you want it as a column? What is the rationale behind it?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@parry2k i want a new table ,as below , i have another formula which one is already created for tables , and will work with below table