Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I need to make a table such that in the same table it will have comparision for date wise difference one of this week another for pervious week before and so on It should be in as a column beside percentage of tanks as pervious weeks
Solved! Go to Solution.
Hi @SKC18 ,
Below is my table:
Firstly , you can create a table for slicer:
Then you can create a measure:
Difference =
var _lastndays= CALCULATE(SUM('Table'[percentage of tanks]),FILTER(ALL('Table'),[Fill Efficency]=MAX('Table'[Fill Efficency])&&'Table'[Date] >= NOW() - SELECTEDVALUE('Last N Days'[Last N Days])))
var _tillnow=CALCULATE(SUM('Table'[percentage of tanks]),FILTER(ALL('Table'),[Fill Efficency]=MAX('Table'[Fill Efficency])))
RETURN _tillnow - _lastndays
Since there are product dates, I choose today's time as the basis for calculating the fundamental.
Then the final output is shown in the following figure:
You can choose the parameter above to dynamically get the percentage difference between different time periods
If you want to achieve dynamic results , it is recommended to use measure instead of column.
The difference between column and measure is in the detail link:www.thedataschool.com.au
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @SKC18 ,
Below is my table:
Firstly , you can create a table for slicer:
Then you can create a measure:
Difference =
var _lastndays= CALCULATE(SUM('Table'[percentage of tanks]),FILTER(ALL('Table'),[Fill Efficency]=MAX('Table'[Fill Efficency])&&'Table'[Date] >= NOW() - SELECTEDVALUE('Last N Days'[Last N Days])))
var _tillnow=CALCULATE(SUM('Table'[percentage of tanks]),FILTER(ALL('Table'),[Fill Efficency]=MAX('Table'[Fill Efficency])))
RETURN _tillnow - _lastndays
Since there are product dates, I choose today's time as the basis for calculating the fundamental.
Then the final output is shown in the following figure:
You can choose the parameter above to dynamically get the percentage difference between different time periods
If you want to achieve dynamic results , it is recommended to use measure instead of column.
The difference between column and measure is in the detail link:www.thedataschool.com.au
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Please remember to adhere to the decorum of the Community Forum when asking a question.
Please provide your work-in-progress Power BI Desktop file (with sensitive information removed) that covers your issue or question completely in a usable format (not as a screenshot). You can upload the PBIX file to a cloud storage service such as OneDrive, Google Drive, Dropbox, or to a Github repository, and then share a file’s URL.
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
This allows members of the Forum to assess the state of the model, report layer, relationships, and any DAX applied.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.