need urgent help
17 TopicsNeed Urgent Help on SamePeriodLastYear
Dear Pros, Can you please help me to calculate the below? I have the sales data of 2024 & 2025 in the same table. 1. I want to calculate the difference between 2025 month on month data and 2024 month on month. 2. I want to calcuate the % differece between 2025 month on month data and 2024 month on month. I also have the categories and subcategories, I want difference based on these level as well. I want to show the result in a clustered column char ThanksSolved1.4KViews0likes11CommentsNeed Urgent Help to fix this dax measure
Hi Team I need your help to calculate the PD Date using the following logic: For each day: If the total number of containers for that day is more than the allowed capacity, then: PD Date = Max ETA + Clearance Days + 1 If it's within the capacity, then: PD Date = Max ETA + Clearance Days This check should continue daily, and also consider: If the containers left from the previous day plus today’s containers are more than the capacity, then: PD Date = Max ETA + Clearance Days + 1 Otherwise: PD Date = Max ETA + Clearance Days Could you please help me apply this logic and get the correct PD Dates?Solved543Views0likes2CommentsRanking by Profit-Difference in Two Months for productCategory Column
Hi I need some assistance with a DAX calculation. I'm trying to rank product-categories based on the Profit difference between two specific months. Here's the approach I've taken: Created Caclulated column 2019-Jan-profit for January 2019 and 2019-Mar-profit for March 2019. Created Calculated column Profit-Difference = 2019-Jan-profit - 2019-Mar-profit. Now When I show CAtegory and Profit-Difference it works well. Next I created Rank column of categories based on the sales difference but number our random. I'm encountering issues with the ranking calculation. The ranking doesn't seem to be accurate, and I suspect there might be an issue with my DAX formulas. Here are the formulas I've used: 2019-Jan-profit = If( [YearMonth] = "2019-01", [Profit] , 0.0) 2019-Mar-profit = If( [YearMonth] = "2019-03", [Profit] , 0.0) Profit-Difference = 2019-Jan-profit - 2019-Mar-profit Rank = RANKX( ALL( [ProductCategory] ) , [Profit-Difference], , DESC) Here is the sample Data YearMonth Category SubCategory Contract Profit 2019-01 Retail Brand A Contract X 5000 2019-01 Wholesale Brand B Contract Y 7000 2019-01 Online Brand C Contract Z 10000 2019-01 Retail Brand A Contract X 8500 2019-01 Wholesale Brand B Contract Y 9200 2019-01 Online Brand C Contract Z 9500 2019-01 Retail Brand A Contract X 9200 2019-01 Wholesale Brand B Contract Y 10500 2019-01 Online Brand C Contract Z 11000 2019-01 Retail Brand A Contract X 9800 2019-01 Wholesale Brand B Contract Y 10500 2019-02 Online Brand C Contract Z 12000 2019-02 Retail Brand A Contract X 7800 2019-02 Wholesale Brand B Contract Y 8500 2019-02 Online Brand C Contract Z 10500 2019-02 Retail Brand A Contract X 9200 2019-02 Wholesale Brand B Contract Y 9700 2019-02 Online Brand C Contract Z 11500 2019-02 Retail Brand A Contract X 9800 2019-02 Wholesale Brand B Contract Y 10500 2019-02 Online Brand C Contract Z 11000 2019-03 Retail Brand A Contract X 8300 2019-03 Wholesale Brand B Contract Y 8900 2019-03 Online Brand C Contract Z 10500 2019-03 Retail Brand A Contract X 9400 2019-03 Wholesale Brand B Contract Y 10000 2019-03 Online Brand C Contract Z 11500 2019-03 Retail Brand A Contract X 9700 2019-03 Wholesale Brand B Contract Y 10500 2019-03 Online Brand C Contract Z 11000 2019-04 Retail Brand A Contract X 8800 2019-04 Wholesale Brand B Contract Y 9200 2019-04 Online Brand C Contract Z 10500 2019-04 Retail Brand A Contract X 9600 2019-04 Wholesale Brand B Contract Y 10200 2019-04 Online Brand C Contract Z 11700 2019-04 Retail Brand A Contract X 9900 2019-04 Wholesale Brand B Contract Y 10800 2019-04 Online Brand C Contract Z 11200 Expected Output : Category 2019-Jan-profit 2019-Mar-profit Profit Difference Rank Wholesale 37200 29400 7800 1 Retail 32500 27400 5100 2 Online 30500 33000 -2500 3Solved938Views0likes4CommentsCount orders with specific conditions
I hope someone may assist me with this... Currently I have a table of projects that can be Won, Lost or No Realized, the column of this os really exisiting, the problem that I have is that the same project can have No Realized and Won Status in different dates, or Not Realized and Lost Status. However, I would like to know how many orders I have with No Realized Status if the project doesn't have status of Won or Lost previously example of the table ----------------------------- Project | Status A | No Realized A. | Won B | No Realized C. | No Realized C. | Lost D. | No Realized D. | Lost E. | No Realized F | No Realized --------------------------- So the result should be: won projects: 1 lost projects: 2 No realized projects: 3Solved1.8KViews0likes10CommentsDoing a rank with a column created in variable
Hi everyone, I need to rank the Sales of the Employees, but I have a table and a new column called Test created as a variable in th DAX. This is to improve the performance. I have tried it without and it is taking too long to load, so this is my only solution. The loading time is no problem anymore but now I dont know how to iterate through the new column Test to get the ranking right. I need to use that column (which is a replication of the column Sales) because the column Sales is based on a lot of measures, which is the reason why it takes so long to load. The query is executing but the rankings come out all as 1. It must be due to the SUMX() that just compares every row with itself. How can I fix this? Your help is gretaly apreciated. Measure = VAR table_ = ADDCOLUMNS ( SUMMARIZE ( 'TableEmployee', 'TableEmployee'[Employee], "Sales", 'TableSales'[Sales] ), "Test", [Sales] ) RETURN RANKX( ALLSELECTED( 'TableEmployee'[Employee] ) , ( SUMX(table_, [Test])),,ASC,Dense)1KViews0likes3CommentsLimit Parameter slicer to be applied to a specific measure in Matrix
Hi Everyone, I have a matrix visual with MTD and YTD values for expenses with location and account lines. I need MTD to be filtered and i want YTD to remain static, to filter the MTD value i have used a parameter and used slicer from it. How can i limit YTD value to not get affected from the slicer. I also have a relation from table A with the parameter table. The measure for YTD value is as below: YTD = VAR n = [EXPENSES] VAR d = year(today()) RETURN CALCULATE( n, ALLEXCEPT('Table A', 'Table A'[Date].[Year]), 'Table A'[Date].[Year] = d ) Measure for MTD: MTD-PARAM = CALCULATE( [EXPENSES], 'Table A'[Month NO] = SELECTEDVALUE('Parameter Table'[Month NO]) && YEAR('Table A'[Date]) = YEAR(TODAY()) ) Thanks For the help.Solved891Views0likes3Commentsfixed Average of a value when multiple dates are selected from slicer.
Hi, I am calculating KPI for Actuals vs Target, the target and actuals are Average values and I get single value however as soon as i add KPI into the visual i get three different KPI whereas the KPI were to be calculated based on the average of actuals and target. I am trying to get KPI when multiple dates are selected from slicer. I also have different targets for different months. for example, in the table below I wanted to get a single KPI for average of target and average of Actual. I am using a date filter and Room Name filter in this table visual. the KPI for this visual was supposed to be bad as the average of actual is over the Average of target value. How can i make sureto get a single KPI in this condition, i am using this kpi to format my Gauge Axis Visual. how to get a single value for Average of Target and Actual when i select multiple or a single date from the slicer. Thank you !Solved1.1KViews0likes4CommentsCalculating Share of Sales by Owner in Power BI with Changing Ownership Percentages
I am working on a sales analysis report where I have two tables: "Ownership" and "Sales." The "Ownership" table contains information about the percentage ownership of products by different owners, while the "Sales" table contains details about the sales transactions. The "Ownership" table has the following columns: product, owner, financial year (fy), financial quarter (fq), and percentage. Here's a sample: product owner fy fq percentage x dattu 24 q1 50 x dattu 24 q2 70 x san 24 q1 50 x san 24 q2 30 y dattu 24 q1 30 y dattu 24 q2 70 y san 24 q1 70 y san 24 q2 30 The "Sales" table contains columns for date, product, and sales amount. Here's a sample: date product sales 03-04-2023 x 10 04-04-2023 y 20 05-04-2023 x 30 06-04-2023 y 40 07-04-2023 x 50 08-04-2023 y 60 ... ... ... Our financial cycle starts on April 1st and ends on March 31st. Each quarter consists of three consecutive months. For example, financial quarter 1 (fq1) includes April, May, and June. I need to create a report where users can filter sales based on a specific date range. For instance, if a user selects a date range from 10/4/23 to 9/7/23, the sales should be filtered accordingly. Here's an example of the filtered sales data: date product sales 10-04-2023 y 80 03-05-2023 x 90 04-05-2023 y 100 05-05-2023 x 110 06-05-2023 y 120 07-05-2023 x 130 ... ... ... Now, I want to create a table visualization in Power BI to show the share of sales by owner based on the changing ownership percentages for the selected date range. The desired output should be as follows: Owner Total Sales dattu 815 sanket 615 I have attempted to calculate this using DAX measures, but I'm facing challenges in incorporating the changing ownership percentages for daterange. amitchandak please helpSolved791Views0likes2CommentsCalculating Share by Owner in Power BI with Changing Ownership Percentages
I have two tables in Power BI: "Ownership" and "Sales". The "Ownership" table contains the product-wise ownership percentages by owner, while the "Sales" table contains information about the sales, including the date and product. The ownership percentages vary each quarter, and I need to calculate the share by owner based on these changing percentages. Table: Ownership product owner fy fq percentage x dattu fy24 q1 50 x dattu fy24 q2 70 x sanket fy24 q1 50 x sanket fy24 q2 30 y dattu fy24 q1 30 y dattu fy24 q2 70 y sanket fy24 q1 70 y sanket fy24 q2 30 Table: Sales date product sales 03-04-2023 x 10 04-04-2023 y 20 05-04-2023 x 30 06-04-2023 y 40 07-04-2023 x 50 08-04-2023 y 60 09-04-2023 x 70 10-04-2023 y 80 03-05-2023 x 90 04-05-2023 y 100 05-05-2023 x 110 06-05-2023 y 120 07-05-2023 x 130 05-07-2023 y 140 06-07-2023 x 150 07-07-2023 y 160 08-07-2023 x 170 09-07-2023 y 180 10-07-2023 x 190 11-07-2023 y 200 12-07-2023 x 210 13-07-2023 y 220 Our financial cycle starts on April 1st and ends on March 31st. Each financial quarter consists of three months. For example, financial Q1 includes April, May, and June. I would like to create a report with a date filter so that when the user selects a date range, the sales data is filtered accordingly. For example, if the user selects the date range from 10/4/23 to 9/7/23, the sales data should be filtered as shown below: Table: Filtered Sales date product sales 10-04-2023 y 80 03-05-2023 x 90 04-05-2023 y 100 05-05-2023 x 110 06-05-2023 y 120 07-05-2023 x 130 05-07-2023 y 140 06-07-2023 x 150 07-07-2023 y 160 08-07-2023 x 170 09-07-2023 y 180 Based on the ownership percentages and filtered sales data, I would like to create a final report as a table visual in Power BI. Table: Final Report Owner Total sanket 615 dattu 815 The calculation for the final report can be understood from the table below: Table: Calculation Details owner fy fq product perc total(ignore owner) share dattu fy24 q1 x 50 330 165 sanket fy24 q1 x 50 330 165 dattu fy24 q1 y 30 300 90 sanket fy24 q1 y 70 300 210 dattu fy24 q2 x 70 320 224 sanket fy24 q2 x 30 320 96 dattu fy24 q2 y 70 480 336 sanket fy24 q2 y 30 480 144 In the "Calculation Details" table, I have computed the share by owner based on the ownership percentages and total sales (ignoring the owner). For each owner, financial year (FY), financial quarter (FQ), and product combination, I calculated the share using the following formula: Share = Total (Ignore Owner) * Percentage Hi super users, Please kindly help stuck with 15 days amitchandak Greg_Deckler tamerj1 johnt75 Jihwan_Kim474Views0likes1CommentHelp in dax
I have two tables in Power BI: "Ownership" and "Sales". The "Ownership" table contains the product-wise ownership percentages by owner, while the "Sales" table contains information about the sales, including the date and product. The ownership percentages vary each quarter, and I need to calculate the share by owner based on these changing percentages. Table: Ownership product owner fy fq percentage x dattu fy24 q1 50 x dattu fy24 q2 70 x sanket fy24 q1 50 x sanket fy24 q2 30 y dattu fy24 q1 30 y dattu fy24 q2 70 y sanket fy24 q1 70 y sanket fy24 q2 30 Table: Sales date product sales 03-04-2023 x 10 04-04-2023 y 20 05-04-2023 x 30 06-04-2023 y 40 07-04-2023 x 50 08-04-2023 y 60 09-04-2023 x 70 10-04-2023 y 80 03-05-2023 x 90 04-05-2023 y 100 05-05-2023 x 110 06-05-2023 y 120 07-05-2023 x 130 05-07-2023 y 140 06-07-2023 x 150 07-07-2023 y 160 08-07-2023 x 170 09-07-2023 y 180 10-07-2023 x 190 11-07-2023 y 200 12-07-2023 x 210 13-07-2023 y 220 Our financial cycle starts on April 1st and ends on March 31st. Each financial quarter consists of three months. For example, financial Q1 includes April, May, and June. I would like to create a report with a date filter so that when the user selects a date range, the sales data is filtered accordingly. For example, if the user selects the date range from 10/4/23 to 9/7/23, the sales data should be filtered as shown below: Table: Filtered Sales date product sales 10-04-2023 y 80 03-05-2023 x 90 04-05-2023 y 100 05-05-2023 x 110 06-05-2023 y 120 07-05-2023 x 130 05-07-2023 y 140 06-07-2023 x 150 07-07-2023 y 160 08-07-2023 x 170 09-07-2023 y 180 Based on the ownership percentages and filtered sales data, I would like to create a final report as a table visual in Power BI. Table: Final Report Owner Total sanket 615 dattu 815 The calculation for the final report can be understood from the table below: Table: Calculation Details owner fy fq product perc total(ignore owner) share dattu fy24 q1 x 50 330 165 sanket fy24 q1 x 50 330 165 dattu fy24 q1 y 30 300 90 sanket fy24 q1 y 70 300 210 dattu fy24 q2 x 70 320 224 sanket fy24 q2 x 30 320 96 dattu fy24 q2 y 70 480 336 sanket fy24 q2 y 30 480 144 In the "Calculation Details" table, I have computed the share by owner based on the ownership percentages and total sales (ignoring the owner). For each owner, financial year (FY), financial quarter (FQ), and product combination, I calculated the share using the following formula: Share = Total (Ignore Owner) * PercentageSolved871Views0likes1Comment