urgent help
23 Topicsfixed 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.1KViews0likes4CommentsDuplicates streaming dataset
Hi Team, In streaming dataset whenever I push a data that is already present in the dataset (duplicate), the row is getting deleted or hidden. But the same is visible when I try to show a sum or functions like that. Is there any documentation on how the duplicates are handled in the streaming/push datasets or the logic ? Also if I wish to have the duplicates is there anay way to do so ? Expecting a reply. Thanks636Views0likes1CommentHelp 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) * PercentageSolved867Views0likes1CommentPlease Urgent Help with Creating Period blocks from Start Date Column
Hello, Please, I desperately need help with any tips or recommendations on how to target this problem. I have one requirement in a cencus report I built to add actuals to target services of patients. What I mean by this is, if I have a patient who is required to have their services done 2 times monthly, I would hope from the start date to 30 days from that start date, they have been attended to, 2 times giving me 100% of my actual to target. So again, if my expected services to be done is set to be 2 services monthly, my actual services in that time period from the start date e.g. 1/1/2022 - 1/31/2022 is 1, then that I would have been attended to just 50% of the time. Is there a way anyone could advise me how to target this problem given the below data, and if so, would you recommend some ideas please? I really need help with how I can build some of this period blocks so if its - monthly, +30 days from start date - weekly, +14 days from start date -bi-monthly, +60 days from start date - quarterly, +90 days from start date and so on I had to model both of these fact tables in power bi. I can also perform a join in the database to merge all to one, of which I plan to do. Its just a bit challenging considering the frequency table has a start & end date, and the service table has just a calendar date. I guess I can join both tables on their patient_id and service_date where it falls between the from and to date columns in the frequency table. But please advise, anything would be greatly appreciated. I really need inputs on how to get this one visual out. THANK YOU so much in advance. Sample raw data frequency_table: patient_id patient_name start_date end_date expected_frequency frequency_code frequency_type 1001 Sara S 6/18/2020 12/31/2020 2 3 Monthly 1001 Sara S 1/1/2021 3/1/2021 1 4 Bi-Monthly service_table: is_attended code 1 for Yes, 0 for No. patient_id patient_name date is_attended 1001 Sara S 6/18/2020 1 1001 Sara S 6/30/2020 1 1001 Sara S 7/18/2020 1 1001 Sara S 7/31/2020 0 1001 Sara S 8/18/2020 1 1001 Sara S 8/31/2020 0 1001 Sara S 9/18/2020 1 1001 Sara S 9/30/2021 1 1001 Sara S 10/18/2021 1 1001 Sara S 10/29/2021 1 1001 Sara S 11/18/2021 0 1001 Sara S 12/5/2021 0 1001 Sara S 12/18/2021 0 1001 Sara S 12/27/2021 0 1001 Sara S 1/1/2021 1 1001 Sara S 2/1/2021 0 1001 Sara S 3/15/2021 0 Expected Results: to_frequency_date is a sample column for the period date from the frequency "start_date". patient_id patient_name from_date to_frequency_date expected_frequency Actual frequency_type % Actual to Target(freq) 1001 Sara S 6/18/2020 7/17/2020 2 2 Monthly 100% 1001 Sara S 7/18/2020 8/17/2020 2 1 Monthly 50% 1001 Sara S 8/18/2020 9/17/2020 2 1 Monthly 50% 1001 Sara S 9/18/2020 10/17/2020 2 2 Monthly 100% 1001 Sara S 10/18/2020 11/17/2020 2 2 Monthly 100% 1001 Sara S 11/18/2020 12/17/2020 2 0 Monthly 0% 1001 Sara S 12/18/2020 12/31/2020 1 0 Monthly 0% 1002 Sara S 1/1/2021 3/1/2021 1 1 Bi-Monthly 100% Please let me know if you have any questions, happy to clarify.Solved518Views0likes1CommentPlease Urgent Help with Creating Period blocks from Start Date
Hello, Please, I desperately need help with any tips or recommendations on how to target this problem. I have one requirement in a cencus report I built to add actuals to target services of patients. What I mean by this is, if I have a patient who is required to have their services done 2 times monthly, I would hope from the start date to 30 days from that start date, they have been attended to, 2 times giving me 100% of my actual to target. So again, if my expected services to be done is set to be 2 services monthly, my actual services in that time period from the start date e.g. 1/1/2022 - 1/31/2022 is 1, then that I would have been attended to just 50% of the time. Is there a way anyone could advise me how to target this problem given the below data, and if so, would you recommend some ideas please? I really need help with how I can build some of this period blocks so if its - monthly, +30 days from start date - weekly, +14 days from start date -bi-monthly, +60 days from start date - quarterly, +90 days from start date and so on I had to model both of these fact tables in power bi. I can also perform a join in the database to merge all to one, of which I plan to do. Its just a bit challenging considering the frequency table has a start & end date, and the service table has just a calendar date. I guess I can join both tables on their patient_id and service_date where it falls between the from and to date columns in the frequency table. But please advise, anything would be greatly appreciated. I really need inputs on how to get this one visual out. THANK YOU so much in advance. Sample raw data frequency_table: patient_id patient_name start_date end_date expected_frequency frequency_code frequency_type 1001 Sara S 6/18/2020 12/31/2020 2 3 Monthly 1001 Sara S 1/1/2021 3/1/2021 1 4 Bi-Monthly service_table: is_attended code 1 for Yes, 0 for No. patient_id patient_name date is_attended 1001 Sara S 6/18/2020 1 1001 Sara S 6/30/2020 1 1001 Sara S 7/18/2020 1 1001 Sara S 7/31/2020 0 1001 Sara S 8/18/2020 1 1001 Sara S 8/31/2020 0 1001 Sara S 9/18/2020 1 1001 Sara S 9/30/2021 1 1001 Sara S 10/18/2021 1 1001 Sara S 10/29/2021 1 1001 Sara S 11/18/2021 0 1001 Sara S 12/5/2021 0 1001 Sara S 12/18/2021 0 1001 Sara S 12/27/2021 0 1001 Sara S 1/1/2021 1 1001 Sara S 2/1/2021 0 1001 Sara S 3/15/2021 0 Expected Results: to_frequency_date is a sample column for the period date from the frequency "start_date". patient_id patient_name from_date to_frequency_date expected_frequency Actual frequency_type % Actual to Target(freq) 1001 Sara S 6/18/2020 7/17/2020 2 2 Monthly 100% 1001 Sara S 7/18/2020 8/17/2020 2 1 Monthly 50% 1001 Sara S 8/18/2020 9/17/2020 2 1 Monthly 50% 1001 Sara S 9/18/2020 10/17/2020 2 2 Monthly 100% 1001 Sara S 10/18/2020 11/17/2020 2 2 Monthly 100% 1001 Sara S 11/18/2020 12/17/2020 2 0 Monthly 0% 1001 Sara S 12/18/2020 12/31/2020 1 0 Monthly 0% 1002 Sara S 1/1/2021 3/1/2021 1 1 Bi-Monthly 100% Please let me know if you have any questions, happy to clarify.Solved553Views0likes1CommentMost Recent Discharge Date Row Record
Please how can I get the most recent row values if I have a sample data like this. I used the calculate and filter allexcept function but I got only the dates and not the corresponding Ids. Table: patient_name patient_Id discharge_date record_Id Mark 1 3/15/2019 1001 John 2 6/3/2020 1002 Tom 3 8/7/2020 1003 Tom 3 9/1/2020 1004 Tom 3 9/3/2020 1005 Sarah 4 2/1/2018 1006 Kim 5 7/6/2017 1007 Mark 1 4/7/2020 1008 Tom 3 11/1/2020 1009 Steve 6 3/2/2019 1010 Expected Results: patient_name patient_Id discharge_date record_Id John 2 6/3/2020 1002 Sarah 4 2/1/2018 1006 Kim 5 7/6/2017 1007 Mark 1 4/7/2020 1008 Tom 3 11/1/2020 1009 Steve 6 3/2/2019 1010 Thank you so much.Solved1KViews0likes3CommentsUrgent Help with Creating a Flag column
Problem: Please, I am trying to check if my recent admission location is the same as my recent discharge location and create a flag to help me with my other measures. How to approach this. check... 1. The patient's most recent admission location 2. The patient's most recent discharge location 3. Create a flag to see if they have the same location then 1, else 0 Table: patient_name patient_Id admission_date discharge_date record_Id Location Mark 1 1/1/2018 3/15/2019 1001 A John 2 6/1/2019 6/3/2020 1002 B Tom 3 1/1/2020 8/7/2020 1003 A Tom 3 8/7/2020 9/7/2020 1004 C Tom 3 9/7/2020 10/3/2020 1005 A Sarah 4 7/2/2015 2/1/2018 1006 C Kim 5 3/1/2016 7/6/2017 1007 E Mark 1 3/16/2019 4/7/2019 1008 A Tom 3 2/1/2021 1009 C Steve 6 3/2/2019 1010 John 2 3/4/2022 5/10/2022 1011 A Expected Results: patient_name patient_Id location_flag //Explanation Mark 1 1 most recent discharge location and new admission location is the same so flag is 1 John 2 1 recent discharge location is same as recent admission Tom 3 0 different locations for their recent admission and discharge record Sarah 4 0 has only one record Kim 5 0 has only one record Steve 6 0 has only one record, no discharge record Thank you very much in advance.Solved874Views0likes2CommentsSumx function isn't working
Hi there, please help me. my sumx function isnt working for a total qty measure i calculated. I have my Qty measure where I am replacing my empty rows with the previous values as such final Qty = VAR CurrentValue = SUM ( data[qty]) VAR PreviousValue = if( sum(data[qty]) = BLANK(), CALCULATE( sum(data[qty]), date[date_dt] = MAX(date[date_dt])-1, )) RETURN if( max(date[date_dt]) =max(date[date_dt]) , CurrentValue + PreviousValue, CurrentValue ) When I put this total on my table view, I dont get the iterative total by the dates as I would like to see. It is giving me the total qty logic as if I was jusr doing a sum(qty). Iterative Qty = sumx(values(date[date_dt]), [final Qty]) (this should add up all the values on the views itself but when I look at it, the rows are correct but the total is still wrong. I had to export it to excel and noticed its not working) Any other way to add my iterative values for my view?Solved1.9KViews0likes3CommentsTwo Fact Tables Nightmare - Calling all Power BI Gurus
I'll be refreshing this page every minute in hopes that a Power BI Guru can save my project. I was given a Historical-Current Fact Table, we will call this TABLE 1, where they wanted a plethera of measures that analyzed trend in multiple areas. Example would be like Total Sales - Easy to do. I was then asked to make a Forecast Table out of Dax, we will call this TABLE 2. This table had only had one column - Years. Under this column, were 3 rows "2023, 2024,2025". Easy. With this Forecast Table, they asked for me to make measures that forecasted what the future trend would be based applying on what paramters on the Current Year. This was doable. I was able to apply CAGR based on the Current data provided in TABLE 1. Each table has it's own measures for things like, total sales, total product, ect. Now, I'm being asked to Create a 3rd Table, a Date Table, for the specific use of displaying Table 1 and Table 2 data together. Pictures below. Now, I tried Using UNION to combine the 2 Fact tables, not working. Can someone please help me? PLEASE NOTE.. TABLE 1 "HIST SALES" IS A MEASURE, AND TABLE 2 PROJECTED SALES IS A MEASURE...I'M HOPING THAT IT'S POSSIBLE TO ACHIEVE TABLE 3 TO SHOW RUNNING TOTALS832Views0likes3CommentsCAGR HELP! Forecasting using Current data
I literally forgot how to do this, please help. I have a table that has 2018-2022 Year sales. I created a whatifparameter from 0-100% to be the CAGR value. Focusing only on 2022 sales, I want the user to be able to select their desired CAGR % and see what the how it impacts 2023-2025 forecasted sales. Forecasted Sales is dax table using Union Row...example belowSolved1KViews0likes1Comment