urgent
22 Topicssplitting string by delimiter and comparing the results for mismatch values
Hi All, I have a dataset containing two string columns(Region names). The values are combined with a delimiter ; I need a distinct count of rows that have a mismatch between RegionA and RegionB for a date. I will need to use the measure in a table to show the count of mismatch rows (values not matching or when there is null) when Agency = "Yes". From the below example, For 11/1/2024, the total should be 2(345 is not counted as Agency = No), for 11/8/2024 the total will be 1 Thanks in advance for your time and help. Date ColumnA Agency RegionA RegionB Mismatch 11/1/2024 123 Yes Phoenix;Charlotte Phoenix 1 11/8/2024 123 Yes Phoenix;Charlotte Phoenix;Charlotte 0 11/1/2024 345 No Edison;Atlanta 1 11/1/2024 567 Yes Tampa;Raleigh 1 11/8/2024 345 Yes Edison;Atlanta Edison 1 11/8/2024 567 Yes Tampa;Raleigh Tampa;Raleigh 0Solved1.8KViews0likes11CommentsDAX self join query to get distinct count based on filter criteria
Hi All, I am getting stuck in converting a SQL query to DAX. I want distinct count of ColumnA when all IDs in columnB has value = 'NK'(ColumnC). This needs to be checked for every Date(grouped by date). So from the below example, for 11/8/2024, the DAX needs to return the total of 1(Because only 145 has all column B values with NK and the others have a mix of K and NK). For 11/1/2024, the total will be 0. Basically counting Column A when all the grouped values in Column B have NK This DAX is used in a matrix which splits these counts based on aging bucket and area. Greatly appreciate the help. The SQL that wrote is as below (wrote based on checking the negative condition) select distinct ColumnA from TableA ( (select count(1) from TableA TA1 where TA.ColumnA = TA1.ColumnA and TA.Date=TA1.Date and (TA1.ColumnB='K' or TA1.columnA is null) )=0 ) Table A Date ColumnA ColumnB ColumnC 11/8/2024 123 345 K 11/8/2024 123 333 11/8/2024 145 678 NK 11/8/2024 145 666 NK 11/8/2024 145 786 NK 11/8/2024 157 567 NK 11/8/2024 157 555 K 11/1/2024 145 666 K 11/1/2024 145 786 NKSolved922Views0likes4CommentsMissing values in cumulative dax
Hello, I am trying to get a cumulative total which as you can see below it works, except in period 05 and 09, the totals should be 68 for period 05 and 108 for period 09. Since there were no values found for that period it gives you a zero. Can you please assist. Measure 2 = var startyear = DATE(2022,10,01) var enddate = MAX(Table1[Date Entered])-365 return IF(CALCULATE(COUNTA('Table1'[ID]),DATESBETWEEN('Calendar'[Date],startyear,enddate))=BLANK() ,0, CALCULATE(COUNTA('Table1'[ID]),DATESBETWEEN('Calendar'[Date],startyear,enddate)))Solved914Views0likes5CommentsADD NEW COLUMN with DAX throwing error
I have created a PBIX File on desktop with multiple tables. Out of those I have created an active relationship between 2 tables, Table A & Table B. Relationship between A&B is Many to One (Both) cardinality Now I added a NEW COLUMN in Table A and entered a DAX Formula which comprises of multiple conditions (refer formula below) using Columns from both Tables A&B. The same formula worked in another PBIX File with a different data set. However, despite both tables having an active relationship, the DAX formula is not suggesting Table B or any of it's Columns, so despite my formula being correct the result is an error with incomprehensible errors. Please help. Please Note- -Relationship Active -All Columns in Text Format -No data related errors upon refresh -Tables refreshed both in Transform, front end as well in the Relationship Model -Checked for duplications, blanks, etc. No data discrepancies -DAX Formula is New Column = MAXX(FILTER( 'TABLE A','TABLE A'[Date]>='TABLE B'[Migration Date]&& 'TABLE A'[Date]<='TABLE B'[Exit Date]&& 'TABLE A'[Unique Code]='TABLE B'[Unique Code]&& 'TABLE A'[Cluster Code]='TABLE B'[Cluster Code]), 'TABLE B'[Name])882Views0likes4CommentsColumns With Multiple Data Types in Power BI
Hello, Currently within my dataset there is a column that contains numerical, text, percentage and currency data types. Is it possible to show them in the same datatype while we select? The table when loaded it saves it by default as text which is understandable. For example: Value 89 150 103 150 $ 1,548,550.45 $ 2,909,454.99 Phase 0 Phase 0 Phase 0 Phase 0 94% 101% 95% 99% Excel and Power BI difference. Thanks for hellping in Advance Ayush585Views0likes1CommentCalculating 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 helpSolved788Views0likes2CommentsHelp 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) * PercentageSolved869Views0likes1CommentCounting the values of a calculated measure
Hello everyone, I am creating a report that audits different columns and if the value is accurate, it comes back as Good, and if it isn't, it comes back as Fix. I then did a new measure that looked at those different columns, and if any of them said Fix, it returns value of Action Opp, and if all of them say Good, it returns a value of Good. My next step is to create a chart that shows the total count of Action Opp values and total of Good values. I've tried multiple ways of doing this an nothing is working. Any ideas of how I can count the total of each value?599Views0likes1Comment