conditional
15 TopicsConditional Formatting font text Amber
Is there a way to change the font colour of a text column [BRAG STATUS] with the values "Green", "Amber" & "Red" I'm able to use conditional formatting to get a value by field for the first values (see pic attached) but it doesn't pick up the amber colour: I've even tried to use a switch function to change the HEX colours but I still cant quite get it Conditional Colour Format = SWITCH(TRUE(),MAX(audit_results[BRAG STATUS])="Green",1,MAX(audit_results[BRAG STATUS])="Amber",2,MAX(audit_results[BRAG STATUS])="Red",3) Any help on this would be great! Thanks,Solved7KViews0likes4CommentsMeasure not working for running total with conditions (built on measures)
Please can someone help with this measure for a running total. The Power BI report with the model is available. Example files here. I'm trying to replicate the calculation in column E from the Excel file. This calculation in Excel caps the lowest value from column D i.e. if it's less than 0, it caps it at 0 so that negative numbers don't accumulate in the running total excessively. I don't know how to add this condition into my running total measure. This is the measure: Running Total Incorrect = VAR Reference = SELECTEDVALUE( 'DummyDataDemand'[ID], 0 ) RETURN SUMX ( FILTER ( SUMMARIZE ( ALLSELECTED ('DummyDataID'), DummyDataID[ID], "RunningTotal", [Exceeded Amount] ), 'DummyDataID'[ID] <= Reference ), [RunningTotal] ) I've also tried to add ADDCOLUMNS to this measure (because summarize used in this way has been depreciated) but I can't get it to work. Help with this would be appreciated.Solved5.7KViews0likes17CommentsSlicer not connecting to visualisation of calculated column
Hi Community, I'm fairly new to Power BI and seeking help for a project of mine. So, the situation is: I have company names in col1, their score in col2 (If rated). I want to create a measure that would consider the line items with a score as "Rated" and the one with blanks as "Not-rated" and visualise the count of rated and Non rated in a pie chart. As of now, I created a calculated conditional column and visualised that column in the pie chart, but if i do that, slicers are not affecting the data on the visualisation. I want the data of my pie chart to change according to slicers, which, from my search I've concluded can't be achieved with calculated columns. I hope I've articulated my question clearly, please ask for clarification if required. Thanks in advance.Solved2.7KViews0likes4CommentsConditional Count Measure
Hi Everyone, I am a fairly new user of PowerBi and I am having difficulties in creating a meausure that counts the number of distinct rows of a table and if the ID is a certain number, then this count is multiplied by two. In coding it would be fairly easy, but i am not sure how i would do this as a PowerBi measure: If StorageType = ("200 (Rack Doble Prof.)" OR "203 (Rack Doble Prof.)" OR "283 - 284 (Cam.Choc)"), THEN DISTINCTCOUNT('WM Stock(AMS-10)'[STORAGE_BIN])*2 Else DISTINCTCOUNT('WM Stock(AMS-10)'[STORAGE_BIN]) I am attaching the following visualization that I create to facilitate the comprehension of what I want to do. This visualization is a matrix that counts the rows, but what i would like to do is have the exact same table, such that the rows 200 (Rack Doble Prof.), 203 (Rack Doble Prof.) and 283 - 284 (Cam.Choc) are all multiplied by two. Thank you!!Solved1.9KViews0likes1CommentReturning value from another table (multiple value but setting a preference what to return)
i have a scenario where i need to return a state of a something from a state tracker (i.e. table 1 below to table 2) as it will return multiple value for certain items, how could the Dax return value based on below scenario ? (i. if the item has Active state at all, always return Active & if there is no Active state but other multiple state , return either 1 -maybe first hit of state alphabetical order) been googling around, the nearest is to use FIRSTNONBLANK, but i cant assure Active state is always the first hit as in the case of SVR1 belowSolved1.7KViews0likes5CommentsCondition column
Dear All, I have a column where i have a list of countries, another column for date and then the values etc. But for some countries i do not want to show the data after certain month and date. for example before 2019 all country data to be shown, total countries = 70 after June 2019 show all data except one country , now new total countries = 69 and again after Dec 2019 do not show one more country , now the final country list = 68 how do i do this, tried conditional column but it only allows me one condition. i need to specify, if month year >= 2019 then show all country, and if month year june 2019 >= june then show all but one, etc.Solved1.5KViews0likes3CommentsConditionally (item selected/filtered) show data in clustered chart
Hi everyone, I have the following question: How can you conditionally show data in a 'clustered colum chart' whenever a certain item is highlighted/filtered? I have the following set-up: Data A table (Table) with 3 columns: respondentId, Question, Answer (long format) Two measures: checkFiltered and TotalCountConditionally The table (named 'Table') looks like this: RespondentId Question Answer 1 A 1 1 B 2 1 C 3 2 A 2 2 B 3 2 C 1 ... ... ... The two measures are calculated as follows: CheckFiltered = IF(ISFILTERED('Table'), TRUE(), FALSE()) TotalCountConditionally = VAR Data = CALCULATE(COUNTA('Table'[Answer])) VAR Check = [CheckFiltered] RETURN IF(Check = TRUE(), Data, BLANK()) These measures were perfectly in a table. As soon as I click a specific question (A, B or C), the filtered data gives me the distribution of the answers (e.g., how many times did A get a number 1, a number 2, ...). The same thing whenever I don't select anything. - No item selected: Item selected: However, when using the data in a chart, the data never gets shown at all. No matter when I select something or not, the clustered chart won't show the data (despite the fact that, whenever I click on 'Show data as table', it does reveal the correct data). My clustered chart is set-up like this: Axis: Answer Values: TotalCountConditionally I hope someone can help me out with this. I've attached the file so people might have a look at it. It only contains dummy data - PowerBI file: https://easyupload.io/15p2kn Kind regards, RJSolved1.1KViews0likes4CommentsNeed help with a DAX measure issue, that doesn't filter correctly.
hi Guys/Girls I've got a measure [FilteredTotal] & [Total], and i'd like to create a measure that returns the value from [Total] when the filter is active on the page, or else if filte is not active return the value for [FilteredTotal]. ConditionalTotal = IF ( ISFILTERED(ChartOfAccounts[Name]), [Total], [FilteredTotal] ) but this doesn't really work, because the value for [Total] still shows when no filter is chosen. what might be the problem? please ask if you need more info to answer/help965Views0likes5CommentsTrying to make a formula conditional by date depending on time from current date
Hi all, I am trying to implement the Excel formula in the below screenshots into DAX for use in a Power BI dashboard. Here is my data, the formula, and an explanation of what the formula does: If a date is over 6 days ago, I do not want to adjust its value. If a date is within 6 days of the current date but more than 2 days ago (so 3, 4, 5, or 6 days ago), I want to increase it by 11.5% each day for the number of days remaining until it hits 6 days. If a date was within the past 2 days, I want to increase it by 13% each day for the number of days remaining until it hits 6 days. The formula shown below accomplishes that in Excel. I am now trying to port the formula into Power BI. I used a formula identical to the one above, but I replaced DAYS() with DATEDIFF(). However, I get an error when trying to reference the date column, saying that "A single value for column 'Date' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result."Solved953Views0likes4Comments