How to use aggregation in filters in Power BI using DAX - filter

Below are the samples of 2 datasets that I am working with.
Stock information of items
Forecast of those items
Now, I am trying to calculate the month from the second picture which exceeds the stock in the first picture.
Could you please help me with how to calculate the month when the forecast exceeds stock from the time of "Date" column in picture 1?
Let me know if you require any further explanation or information.
Thanks in advance,
Vijay

Related

Quicksight Pivot Subtotal Customization

I am creating a visualization in the pivot table in which I have used the average value of one column to be shown in the visualization. In subtotal and total for rows, they are not doing sum but rather taking the average value. For example, the 3 values in that column are 200,300,400 so in subtotal, they are showing 300 I want subtotal as 900. Can someone please help me in getting some solution for this?

How to recalculate the percentages from total when filtering in Power BI?

As I am not really sure how to express myself, I'll better demonstrate what I need to be done.
This is a sample DB.
You see here
that we have a category slicer and on the table is show the percentage of sales for a given product and its description.
On the next photo I used the slicer to filter the products on the "16GB" category. My task is when filtering, the total of the % to show 100% and the distinct products to show the percentage of this total (as part of the category, not of all other products and categories).
Thank you in advance!
You need to have a raw amount in your dataset. I was able to do this using this sample data.
Then for both table visuals in Power BI, you should select show value as percent of grand total for the amount value. This will allow Power BI to calculate the percentages dynamically as the filter criteria from the slicer changes.
Here is the result.

Power Bi matrix subtotal is not the sum of the values in the column

I am trying to create a "meetingroom occupancy" matrix in Power BI. The raw data contains bookings per day per Room. The maximum daily available time per room is 12 hours. I have created a Date Dimension Table for the dates.
I have tried to change datatypes, added the available time column in the query editor, added the available time as DAX column and as calculated measure, but all with no success. I have changed the available time for Room B to 1, and the result of the Subtotal was 13, so it looks like subtotals is only summing unique values, but I do not know how to solve this.
Could someone please explain to me what is happening and how I could solve this?
The input data is as follows:
And my Date_Dimension is as follows:
This is the current and desired result:

How to create visualization using ratio of fields

I have a data set similar to the table below (simplified for brevity)
I need to calculate the total spend per conversion per team for every month, with ability to plot this as time based line chart being an additional nicety. The total spend is equal to the sum of Phone Expenditure, Travel allowance & Misc. Allowance, this can be a calculated field.
I cannot add a calculated field for the ratio, as for some sales person, the number of conversion can be 0 for a given month. So, averaging over team is not option. How can I go about this?
Thanks for help and suggestions in advance!
I've discussed the question with the Harish offline. I've learned that he is trying to calculate ratio per group, not per row.
To perform calculations per group, users can add calculated fields inside a QuickSight analysis and use level aware aggregation expressions. (Note that level aware aggregations can only be used in an analysis, not in the data prep view). Here is a link to the documentation about level aware aggregations if you want to learn more about this area https://docs.aws.amazon.com/quicksight/latest/user/level-aware-aggregations.html

How to get minimum value from range date in DAX

I need to get a calculated measure of the minimum date of a range of values, ie I have a fact table with a date and two measures. When I filter by range date, I need to get the second measure of the minimum date of that range, in the example, the measure 1 of 1st january, something like this:
https://db.tt/6jKBPRCr
The picture on the left is as I have the data in the fact table, data from the right as they should be when I filter from date (from 1st to 6 january). The measure 1 is added for a group, and measure 2 is the minimum value of the range of dates and must be repeated for each resulting record (highlighted).
I need the solution for PowerBI Desktop (DAX)
I would greatly appreciate your help with this.
Thank you for your time

Resources