dax help
4 TopicsConditional Formatting on a Matrix & More
I've been stuck on a problem for my work for a while. I've made progress, but I can't seem to find a prooper solution to my conditional formatting issue. In Microsoft Power BI, I want to setup a matrix visual to show when the Doc Num of a Contract is New, Open, or Closed using Conditional Formatting. This will be over the course of different Verisons of Data pulls, and separated in different Unit groups. I want to ensure that I can adjust the DAX so that Closed only appears after a Doc Num disappears (e.g. not showing Closed in the same version it last appears) My current table has 3 columns: Doc Num, String Version, Decimal number Unit, String Lastly, I want to apply the conditional formatting to the matrix itself. This is because for each version, the Doc Num may change from New, to Open to Closed. Here's my current code: ContDocument Status = VAR _CurrentVersion = SELECTEDVALUE(DataPage_Tables_Append1[Version]) VAR _DocNum = SELECTEDVALUE(DataPage_Tables_Append1[DAC Doc Num]) VAR _CurrentUnit = SELECTEDVALUE(DataPage_Tables_Append1[Unit]) VAR _LastVersion = CALCULATE( MAX(DataPage_Tables_Append1[Version]), FILTER( ALL(DataPage_Tables_Append1), DataPage_Tables_Append1[DAC Doc Num] = _DocNum && DataPage_Tables_Append1[Unit] = _CurrentUnit ) ) VAR _FirstVersion = CALCULATE( MIN(DataPage_Tables_Append1[Version]), FILTER( ALL(DataPage_Tables_Append1), DataPage_Tables_Append1[DAC Doc Num] = _DocNum && DataPage_Tables_Append1[Unit] = _CurrentUnit ) ) RETURN SWITCH( TRUE(), _CurrentVersion = _FirstVersion, "New", _CurrentVersion > _FirstVersion && _CurrentVersion < _LastVersion, "Open", _CurrentVersion = _LastVersion, "Closed", BLANK() ) This is what the Output currently looks like: The problem is, that almost all Doc Nums are in Closed status at the last Version (unless the Doc Num is New during that Version), and that is not actually true. Some of those Doc Nums should be in Open status because it is not confirmed that the Doc Num disappeared. Another functionality that I want to add to my matrix, is to have a Doc Num be reopened in case there is an edit, and the Doc Num must be revisied. I do not know how to do this. Any guidance on this issue would be appreciated. Thank you in advance! Best, tkerr98Solved1.4KViews0likes6CommentsShow and hide a shape depend on a filter is selected (between two dashboards)
I have two dashboards: in the first, you must filter by a client and in the second, there are two options: 1 - If it has been filtered by a client, in the second dashboard that client will be selected and you can filter by one of the addresses of this client. 2 - If the client has not been filtered, on the second dashboard, a rectangular form appears with a message and you cannot choose the addresses. The problem is when I have not filtered by the client because I do not know how to hide the shape. Thank you in advance, Mayte833Views1like0CommentsDax for multiple inner self joins
Hi guys, I need small help in writing DAX for below situation. table_A id date stagetype statustype 1042268 2020-01-27 1 1 1042268 2020-01-27 3 2 1041658 2020-01-27 2 2 1017296 2020-01-27 3 15 1042269 2020-01-27 1 1 1042270 2020-01-27 1 1 1041053 2020-01-27 3 2 1030893 2020-01-27 2 2 1030893 2020-01-27 3 2 1042271 2020-01-28 1 1 The SQL query is select Count(DISTINCT R.id) AS 'ID' FROM table_A R WITH(nolock) INNER JOIN (SELECT DISTINCT SS.id, Min(SS.date) AS MinDate FROM table_A SS WITH(nolock) WHERE SS.id IN (SELECT SSS.id FROM table_A SSS WITH(nolock) WHERE SSS.stagetype = 5 AND SSS.statustype = 4) AND SS.statustype = 13 AND SS.stagetype = 5 GROUP BY SS.id) AS MinDate ON R.id = MinDate.id AND MinDate.mindate = R.date WHERE R.id IN (SELECT DISTINCT SS.id FROM Table_A SS WITH(nolock) WHERE SS.id IN (SELECT SSS.id FROM Table_A SSS WITH (nolock) WHERE SSS.stagetype = 5 AND SSS.statustype = 4 ) AND SS.statustype = 13 AND SS.stagetype = 5) Actually the query using inner self join. I need DAX for above query. Please help on this.399Views0likes0CommentsUNICHAR for Report Server With Analytical Services
Hello All, Is there any limitation for unichar function while using report server with Analytical Services. Because when i try to write a measure of UNICHAR function i dont see. Can anyone suggest me where i can find the list of functions that i can use while using Report Server with Analytical services. Thanks, Mohan V.1.3KViews0likes1Comment