Forum Discussion
Dynamic calculate based on the parameter value provided by user
- 3 years ago
Hi , Anonymous
Thanks for your quick response!I download your pbix file and i can open it successfully!
For your two needs , here are the steps you can refer to :
(1)We can just modify your [IsInBuffer-check] measure like this:IsInBuffer-check = if(min(SummarizedTable[EndingOnHand])<=0 && min(SummarizedTable[Weekdate])<= [Today+Weeknum], "N","Y")Then we can get this:
(2)For your second need , we can click "New Table" and enter this:
Table 3 = ADDCOLUMNS( ADDCOLUMNS ( SUMMARIZE ( RawDataTable,RawDataTable[Filekey],RawDataTable[Item],RawDataTable[Itemkey],RawDataTable[location],RawDataTable[Productname],RawDataTable[Source] ), "Weekdate", var _t = CALCULATETABLE('RawDataTable') var _t2 = FILTER(_t,[EndingOnHand]<=0) return IF(MINX(_t2,[Weekdate])=BLANK() , MINX(_t,[Weekdate]) ,MINX(_t2,[Weekdate])) ), "EndingOnHand",var _date= [Weekdate] var _t = FILTER( CALCULATETABLE('RawDataTable'),[Weekdate]=_date) return minx(_t,[EndingOnHand]) )Then we can get the result table like this:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thank you Aniya Zhang!
Here is the report with Public sensitivity.. Let me know if you are able to access now else will share you the sample data..
Sorry for the inconvenence!
Sample for dynamic calculation
-Prab
- v-yueyunzh-msft3 years ago
Community Support
Hi , Anonymous
Thanks for your quick response!I download your pbix file and i can open it successfully!
For your two needs , here are the steps you can refer to :
(1)We can just modify your [IsInBuffer-check] measure like this:IsInBuffer-check = if(min(SummarizedTable[EndingOnHand])<=0 && min(SummarizedTable[Weekdate])<= [Today+Weeknum], "N","Y")Then we can get this:
(2)For your second need , we can click "New Table" and enter this:
Table 3 = ADDCOLUMNS( ADDCOLUMNS ( SUMMARIZE ( RawDataTable,RawDataTable[Filekey],RawDataTable[Item],RawDataTable[Itemkey],RawDataTable[location],RawDataTable[Productname],RawDataTable[Source] ), "Weekdate", var _t = CALCULATETABLE('RawDataTable') var _t2 = FILTER(_t,[EndingOnHand]<=0) return IF(MINX(_t2,[Weekdate])=BLANK() , MINX(_t,[Weekdate]) ,MINX(_t2,[Weekdate])) ), "EndingOnHand",var _date= [Weekdate] var _t = FILTER( CALCULATETABLE('RawDataTable'),[Weekdate]=_date) return minx(_t,[EndingOnHand]) )Then we can get the result table like this:
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- Anonymous3 years agoNot applicable
Hi Aniya Zhang,
Thank you fro your help in providing the solution.
I will verfy the output and share you the result and accordingly accept the solution.
Thanks Again!
-Prab