advance dax
15 TopicsConditional Color Formatting in Stacked Column Chart
Hi everyone, I'm not sure if this is possible, but I’d appreciate any insights. I’m trying to apply conditional color formatting to specific columns in a stacked column chart. As shown in the screenshot below, I want to set a condition for the 2nd and 3rd columns: If the bar height is less than or equal to the value of the 1st column, it should appear as white/blank. If the value exceeds the 1st column, it should be colored. Is there a way to achieve this within Fabric? Or would an alternative chart type be better suited for this visualization? Any suggestions or workarounds would be greatly appreciated! Thanks in advance! 1st image: What I have built in Power Bi until now. 2nd Image: What I am looking to build.Sorting Data in Different Order Based on Slicer Selection in Power bi
Hi Everyone, I want to sort the data in a specific order. When I select a value in the slicer. Below is the raw data: Table : Year Month Product Amount 2023 1 AA 100 2023 2 BB 200 2023 3 CC 100 2023 4 DD 100 2023 5 EE 300 2024 1 AA 300 2024 2 CC 500 2024 4 DD 600 2024 5 ZZ 300 2024 6 BB 300 slicer : order Required The order in which the products need to be sorted, when we select the year from slicer.Solved2KViews0likes5CommentsSorting Matrix Data Based on Slicer Selection
Hi Everyone, I want to sort the data in a matrix in a specific order. When I select a value in the slicer. Below is the raw data: The matrix visual contains Product and Value [Measure]. Raw Data Slicer The order in which the products need to be sorted depends on the year value selected in the slicer. Raw Data : Table Product Year Value P3 2023 100 P2 2023 200 P1 2023 300 P8 2023 40 P6 2023 100 P1 2024 200 P3 2024 300 P2 2024 40 P14 2024 100 P12 2024 200 slicer : Year 2023 2024 Required order, when we click on slicer : Order Required 2023 2024 Order order P1 P1 P2 P2 P3 P3 P6 P12 P8 P14Solved1.3KViews0likes4Comments"Sorting Matrix Data Based on Slicer Selection
Hi Everyone, I want to sort the data in a matrix in a specific order. When I select a value in the slicer, Below is the raw data image : The matrix contains Product and Value [Measure]. Raw Data Slicer : The order in which the products need to be sorted on the year value selected in the slicer. Raw Data: Table Product Year Value P3 2023 100 P2 2023 200 P1 2023 300 P8 2023 40 P6 2023 100 P1 2024 200 P3 2024 300 P2 2024 40 P14 2024 100 P12 2024 200 slicer slicer Year 2023 2024 Order needed Order Required [ when I select year in Slicer ] 2023 2024 Order order P1 P1 P2 P2 P3 P3 P6 P12 P8 P14 BeaBFSolved535Views0likes1CommentCreate a DAX that returns the title of the event within event schedule
Hi. I'm having a hard time for days thinking of how to create my DAX measure. I would highly appreciate your help. I want to create a DAX that returns the title of the event if the start and end date of viewers fall within the range of time of the event schedule. The event schedule does not exist in my Power BI model. It is just a reference regarding the order of the online event. The Viewers table is the table I have in my data model. I wish to have this scenario/output. For example: Person A joined and left the online event between 7:00am to 8:00 am, therefore the output is 'Data Driven Decision'. Person C, the output is 'Data Driven Decision', 'Litmus', 'Productivity', and 'Education' since it overlaps to 4 sessions of the online event. I tried this DAX but it does not work for overalapping start time and end time of viewers based on event schedule. Sessions Attended = DDD_Viewers[start_time] >= TIME(07,00,00) && DDD_Viewers[end_time] < TIME(08,00,00) , "Data Driven Decision", DDD_Viewers[start_time] >= TIME(08,00,00) && DDD_Viewers[end_time] < TIME(09,00,00) && DDD_Viewers[PK_Room] = "4" , "Litmus" ) Thank you, Regards, ThirdSolved1.3KViews0likes6Commentsthe start date cannot be later than the end date
i wrote the following DAX code to insert a new column workdays = var TBL_DATE=CALENDAR('RPT_GHAD_PERFORMANCE'[TASK_START_DATE],RPT_GHAD_PERFORMANCE[TASK_END_DATE]) var TBL_FINALDATE= ADDCOLUMNS(TBL_DATE,"WorkingDate",IF(WEEKDAY([Date],1)>=6,0,1)) return SUMX(TBL_FINALDATE,IF([WorkingDate]=1,1,0)) and it used to work but i entred the page and i have the following message that says cant display the visual because the start date cannot be later than the end date please helpSolved2.4KViews0likes1CommentDAX Measure and Background Colour Not Working
I have written a DAX and upon that I want to do color Coding based on certain conditions, DAX Code Reporting months = var MAXD=MAX('Dim_Date'[MMDDYYYY]) var Last13M = DATESINPERIOD('ABCD'[DateOfSample],MAXD,-12,MONTH) RETURN Calculate(Sum('ABCD'[Value]),REMOVEFILTERS('Dim_Date'),KEEPFILTERS(Last13M),USERELATIONSHIP('Dim_Date'[MMDDYYYY],'ABCD'[DateOfSample])) I Have three columns now, Value, EFG, ZPR Based on the condition on the above three columns, I need to give a background color. It could be like DAX M = SWITCH(TRUE(), Value > 1, "Some color" Value = -1 , "Some color" Value > EFG, " Some Color", Value < ZPR, "Some Color" "Some color") But when I do it in the conditional formatting, it doesn't work and highlights only the selected month-year combination and nothing apart from it. You can also see we are using Value column in the measure. Any heads up?458Views0likes1CommentHow to Calculate sum for previous reporting period
Hi, I have to create either a Measure or Calculated Column to get result displayed in Total Commission Previous Reporting Period but I have to be able to filter it. Reporting Periods basically gives snapshot of data, they are not countunious value so I created Rank column to get Total Commission for previous availabe reporting period based on specific Contract#. Contract#s are unique within a specific reporting period. Following table is just an example, my model is much, thousands of different Contracts and ten Reporting periods (attached below). Thank you in advance. Reporting Period Contract# Total Commison Rank Total Commission Previous Reporting Period 202310 888 $125 5 $120 202310 777 $133 5 $184 202309 888 $120 4 $160 202309 777 $184 4 $199 202308 888 $160 3 $130 202308 777 $199 3 $188 202307 888 $130 2 $142 202307 777 $188 1 202306 888 $142 1 ReportingPeriod 202112 202203 202206 202209 202212 202303 202306 202309 202310 202311Solved517Views0likes2CommentsVisualization Not working as needed with dax measure
Visualization drill down not showing. I can only drill through the non-compliant data and not the compliant ones. I have created a formula to check how much data is compliant and non-compliant. For example, if the customer has all the fields populated then he is compliant, so their details are missing from the Query1 table. If the member has a missing information, then he is non-compliant and will be available in the query table. Compliant Formula = DISTINCTCOUNT('DW v_Member'[MemberNum])/CALCULATE(DISTINCTCOUNT(Query1[MemberNum]),ALL(Query1)) Non-Compliant= 1- ( DISTINCTCOUNT('DW v_Member'[MemberNum])/CALCULATE(DISTINCTCOUNT(Query1[MemberNum]),ALL(Query1))) I have also created a calculated column in the member table to check if I can showcase both compliance and Non-compliance data but that is also not working Compliance Check = IF( COUNTROWS( FILTER( Query1, Query1[MemberNum] = 'DW v_Member'[MemberNum] ) ) > 0, "Non Compliant", "Compliant" ) Table information : Dw_Member: is a fact table with all customer information Branch is a fact table with all of company branches Date table Query 1 comprises of only those customers whose profile has a missing information for example date of birth or address etc. A customer can appear more than once if they have multiple information missing Donut chart appears correctly with compliant and non-compliant measures but all other measures are not getting drilled through see second chart363Views0likes0Commentscalculate max and min of a measure
hi everyone I have created a measure that calculated the achievement % . I'm trying to create max, min measure for that column for each sales agent and then find the average achievment% for all categories for the agent. reference to the example below: from the measure [new achiev%], i want to create maximum achievement measure and return 92% and minimum achievement measure return 61% to return and then the average achievement measure to return 73.19% what i'm trying to calculate from these measures is the sales agent incentive. the rules for the measure calculation is: -at least one category has achievment % of 90% -the achievement in all other 3 categories should be at least 70% in the example provided, agent won't get his incentive because he achieved 92% in one category and achieved below 70% in other categories.920Views0likes4Comments