.dax
8 TopicsDAX to calculate total using prior calculated total based on category
Hi - I have below data in Table View and need a Dax formula to compute a column with the total based on prior week's computed number (prior total * factor) for each category: Category Date factor Total calculation A 01/01/24 - 100 A 01/08/24 1.01682 101.68 (100*1.01682) A 01/15/24 1.01734 103.45 (101.68*1.01734) A 01/22/24 1.01939 105.45 (103.45*1.01939) A 01/29/24 1.01854 107.41 (105.45*1.01854) B 01/01/24 1.01792 50 B 01/08/24 1.01612 50.81 B 01/15/24 1.01332 51.48 B 01/22/24 1.01134 52.07 B 01/29/24 1.01166 52.67Solved1.1KViews0likes5CommentsVisualize table with date before a maximum date from a slicer
Hi everyone, I need to create a measure (or other method) to see rows details in my "details page" from my "overview page" not considering start date from slicer date on the "details page". DATA MODEL Table Ticket_PBI: ticket_id (type: string), input (integer), output (integer), input_date (date) Table Calendar_PBI: calendar_date (date) ...are all values from 01/01/2024 to 31/03/2024 Table relationship in the data model: Calendar_PBI (dim table) * -> 1 Ticket_PBI (fact table) REPORT PAGE 1 I have created a page named 'TICKETS OVERVIEW'. I have added the calendar_date (a slicer with a style between) with default values set from start date 01/02/2024 to end date 10/02/2024. I have also added a card that shows the sum of inputs without considering the start date of the slicer from point 1. The card contains a DAX measure "stock current" defined as follows: CALCULATE(SUM(Ticket_PBI[input]), FILTER(Ticket_PBI, Ticket_PBI[input_date] <= MAX(Calendar_PBI[calendar_date])), FILTER(Ticket_PBI, ISBLANK(Ticket_PBI[output]))) So, the result of my card will be = 3, as there are only 3 input_dates that are <= the MAX(Calendar_PBI[calendar_date]), which is 10/02/2024. REPORT PAGE 2 I also created a page named 'TICKETS DETAILS'. I have added the calendar_date (a slicer in style between) with default values set from start date 01/02/2024 to end date 10/02/2024. This slicer is synchronized with the slicer from point 1 of the 'TICKETS OVERVIEW' page. My goal is to display all the ticket_id that meet the "stock current" measure created in point 2. That is, all those ticket_id where their input_date is <= the MAX(Calendar_PBI[calendar_date]) of the slicer. an example of DESIRED OUTPUT, a table visual with these columns and rows:Solved796Views1like2CommentsCalculating 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 helpSolved796Views0likes2CommentsDAX weighted average help for Power pivot
Rm Group Values Beans nuts Flour Date (Month) Document Sum of Outstanding Qty Weight2 Sum of Outstanding Qty Weight2 Sum of Outstanding Qty Weight2 Apr SG 1000000 1.068.350 1000000 3000000 700000 1700000 PN 68350 1.068.350 1000000 3000000 700000 1700000 Dxb 1000000 3000000 300000 1700000 Apr Total 1068350 3000000 1700000 May SG 1000000 2.000.000 PN 1000000 2.000.000 Dxb May Total 2000000 Jun SG PN Jun Total Jul SG PN Jul Total Oct SG PN Oct Total Nov SG PN Nov Total Dec SG PN Dec Total Grand Total I need help in creating a Dax formula for this pivot. I want the total outstanding qty for every month and group( Beans, nuts etc. to appear in the document rows ( just the yellow numbers.) How can I compute a DAX formula for that? Would really love to hear some suggestions as I have been struggling with this for days!Solved955Views0likes2CommentsCurrency conversion with currency and year filters
I have 4 tables downloaded from the bank regarding exchange rates (CurrencyRates_2020,CurrencyRates_2021, etc.) in which there are columns with currencies, months and exchange rates, in the finance table there are columns amounts, inflows, outflows, date. I also added a table that contains currency column that I used to create the filter. What I would like to do is create a measure for amounts, outflows and inflows that will convert to the currency selected by the filter in the year selected by the filter. I've only written the part for the selected currency , but I don't know how to add a date filter. I would like it to fetch me data from the file "CurrencyRates_2021" when I select the date 2021 etc. I wanted to add at the beginning IF(AND(ISFILTERED('Currency'[Currency]),ISFILTERED('Consulting Finance'[Year]) [...] But I have no idea what to write next.946Views0likes3CommentsHow to extract names (Table1) from Id (Table2)
I have two tables one for student’s course information, another for Course Instructor Name. The two tables are joined by Course Instructor PIDM which is common key in both tables. In Expected table (3rd Table I have the Course Instructor PIDM. I want to add the course instructor name on this table too -How can I get this? Thanks in advance for your time and support.731Views0likes2CommentsDAX to return a column that has multiple filter criteria and multiple tables
Hi Good Day, I have a proper data set that involves three tables viz, 1)DataInvoice 2)Points 3)Factor I need a visual that shows Date column from Datainvoice,units column from datainvoice table multiplied with value column from Factor table. But the above can happen with few filter criteria as below 1)Date column from Datainvoice should fall between Start and End date of factor table and then return corresponding Value column 2)while filtering the above we should make sure that DBName-point-id from datainvoice should match DBName-point-id of points table which inturn looks for DBName-Utility in factor table and picks up the VALUE column This is how the relationship looks: I want the output to look like below in a visual File Portfolio performance Looking forware to your response Thanks in advance amitchandak Ashish_Mathur Greg FreemanZ Greg_Deckler382Views0likes0CommentsIndexed numbered column
I do see similar posts to what I am looking for, but it seems like this would be simple DAX. I have a class registration system for internal training here in my organization and now I am creating a Power BI report to show those who are registered for a particular day and session. I would like the registrants to be numbered, in numeric order. (for those familiar, it would be a dim i as int; print i; i+=1). The underlying datatable does have an id column, but this would not work as it is just an identity spec. I have found some examples of DAX that use RANKX, but maybe I am using it wrong. I just need this numbered column (1, 2, 3, etc) for a filtered Class session. ThanksSolved1.6KViews0likes2Comments