@power bi
58 TopicsDAX Calculated Column with "variable tables" as variables.
Greetings I'm attempting to create a calculated column that brings out a result based on the rowscount form another table. The relation is ONLY the id of each individual. The following illustrates the relationship between 2 appointment tables, each of a diferente service. Basically, if a person with an appointment on the left table has an apointment on the right table (along some other variables related to dates and service details), the result is either YES or NO, depending on whether the rowcount of a variable, filtered AND related table is more than 0, or not. column = --[state] can adopt values 1 to 5, and there are blank values. var table1 = filter(relatedtable(table2), not(isblank([state]))) var table2 = filter(relatedtable(table2), [state] in {1, 2}) var table = if(countrows(table2) < 1, table1, table2) var conditioned_tableA = filter (table, ## additional conditions related to date and other variables.##) var countB = countrows(conditioned_tableA) var conditioned_tableB = filter (table, ## different conditons from A ##) var countB = countrows(conditioned_tableB) return switch ( true() , countA > 0, "YES" , countB > 0, "NO" , "YES" ) However, I'm getting the error the expression refers to multiple columns. multiple columns cannot be converted to a scalar value Of course, I know that I can't treat a table as a single value, or viceversa. But that is not what I want. The basis table can either be table1 or table2 depending on wether table2 holds any records. But my end result still is just the count of rows. ¿Any ideas?Solved987Views0likes4CommentsPower BI visuals don't update
Basically, i have published a visual, but for some reason the data don't appear in the visuals but appear in the tables of power BI . I try to delete and made some new visuals, but dont work, it's strange because the data just don't appear in the visuals.Solved980Views0likes5CommentsProblem with My Custom Visual in Power BI
I've developed a DatePicker visual for Power BI, but I'm facing an annoying issue that affects user experience. When users interact with the report, my visual keeps flickering between showing the selected date and showing "Select period" (the no-filter state). This rapid alternation between states happens most noticeably when users select a date or click the "Clear filters" button in Power BI. The root cause seems to be that my visual receives multiple contradictory updates from Power BI in quick succession. One update tells the visual that filters are applied, then immediately another update says no filters exist, then back again to filters being applied. This creates the flickering effect as my visual tries to respond to each update. I'd like to know if this behavior is normal in Power BI or if there's a recommended way to handle these contradictory updates. Is there a technique to make my visual display a consistent state? Also, is there a reliable way to detect when a user has clicked the "Clear filters" button? Any help or suggestions from those who have encountered similar issues would be greatly appreciated.Calculate weighted average based on another field
I have product wise volume and certain budget allocated on it but need to find prorpotion of this budget by calculating share of volume in total volume. I tried few variations of this - using Allselected or All because there were few filters working on this visual matrix table. But unable to get the result shown in weighted average column below. Can any expert help ? Weighted Avg = var totalvol = calculate(sum(table[Vol]),All (table)), Return Sumx( All (table), Divide ((table[Vol]), totalvol) * (table[Budget])) Ex: Product Vol Budget Weighted Avg (Result) A 200 50 12.5 ((200/800)*50) B 200 50 12.5 C 200 48 12 D 200 48 12 Total 800Solved806Views0likes2CommentsPrevious QTD as of today for each quarter
Help me to create a Dax measure to show the Previous QTD actuals as of day(today) for each quarter. I have date , amount columns for example today is 6/19/2024 so we would like to see 2024-Q1 data from start of quarter to till 3/19/2024 2023-Q4 data from start of quarter to till 12/19/2023 2023-Q3 data from start of quarter to till 9/19/2023 2023-Q2 data from start of quarter to till till 6/19/2023 Currently, I am using this measure. But this is giving Total QTD.Previous Quarter QTD Actuals should be less than QTD Rev Previous Quarter QTD Actuals = calculate(SUM(Amount]),DATEADD(filter(DATESQTD('Calendar'[DateVal]),Calendar'[DateVal]<TODAY()),-1,QUARTER))1.3KViews0likes5CommentsDAX query required for IF and IF Else condition of below case
Hi Team, I am new to PBI, help me with this case! IF type(col) = "AAA" & Date time(col) < 11AM then Pickup date = Date(col)-1 ELSE Pickup date = Date(col) IF type(col) = "BBB" then Pickup date = Date(col)–1 IF type(col) = "CCC" then Pickup date = Date(col) Value of "AAA" is having AAA_a, AAA_b, AAA_c, AAA_d, AAA_e ----AAA_n etc. So here we are calling the condition with "AAA". How do we calling "AAA" with one IF condition statement or any other. Same like value of "BBB" & Value of "CCC". Here date time(col) contains 24hrs, we required less than(< )upto 11AM then Pickup date = Date(col)-1, else Pickup date = Date(col). Here Date(col) is calculated column. So, kindly helpe me with the DAX query. below is the snapshot for your reference.Solved1.5KViews0likes10CommentsPaginated report showing incorrect % at grand total level,
Hi, We are getting the incorrect % at pagianted report wherever we used % related inforamtion, i have attached the screenshot from Both power BI and Pagianted report. requesting to look and give the solution for this, we have tried to use both SUM and SUMX for Actual/Budget but still getting the incorrect numbers at grand total level. Sample data Product Name Actual Value Budget Value Sedan 361727 350087 Aura 55952 32679 City 193995 122164 Verna 111780 195244 Total 361727 350087 -DarshanSolved887Views0likes2Comments