Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi!
I have table with app name, date, and the zone of the app. I would like to built the table with column represent each zone that contains the name of the application in that zone. How do I filter it using dax?
I'm not familiar with DAX, i would really appreciate if you can provide the solution with the code. Thankyou in advance!
Solved! Go to Solution.
Hi @Farrah24 ,
Try the following:
AppTotals = GENERATESERIES(1, DISTINCTCOUNT('Index APP'[APP NAME]), 1)
APPS Names =
VAR _tempTable =
TOPN (
MAX ( AppTotals[AppTotals] ),
SUMMARIZE ( 'Index APP', 'Index APP'[APP NAME], 'Index APP'[Date], Zones[Zone] ),
'Index APP'[APP NAME], DESC
)
VAR _RowCount =
COUNTROWS (
DISTINCT ( SELECTCOLUMNS ( _tempTable, "DDD", 'Index APP'[APP NAME] ) )
)
VAR _result =
IF (
MAX ( AppTotals[AppTotals] ) <= _RowCount,
MAXX ( TOPN ( 1, _tempTable ), 'Index APP'[APP NAME] )
)
RETURN
IF (
COUNTROWS ( DISTINCT ( 'Index APP'[Date] ) ) > 1,
"",
_result
)
See file attach.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi!
Sorry for the unclear explanation, I would like to build a table consist of app name that has been classified by their zone, so there will be column named "zone 1", "zone 2", "zone 3", "zone 4" and the value of the each column is app name included in that zone. For the better understanding please refer to picture below
I've tried build 4 separate table for each zone and try to filter manual for each table, but is there any way to make it more efficient? (build in one table).
I attached pbix i used for this case below. thank you in advance!
Hi @Farrah24 ,
Not sure of the request, can you explain a little better what you need to show?
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsSorry for the unclear explanation, I would like to build a table consist of app name that has been classified by their zone, so there will be column named "zone 1", "zone 2", "zone 3", "zone 4" and the value of the each column is app name included in that zone. For the better understanding please refer to picture below
I've tried build 4 separate table for each zone and try to filter manual for each table, but is there any way to make it more efficient? (build in one table).
I attached pbix i used for this case below. thank you in advance!
Hi @Farrah24 ,
For this what you can do is use a matrix table:
If you need to have some specific ordering you can add some dax to make it in order.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi! Thanks for the reply!
I've tried using matrix table and it classify as i wanted to, but not with the appereance of the table. Since i'm using date as a play axis, i want to show the other zone head column like zone 2 and zone 3 (refer to picture) even though there's no value in it and each value of the column must be written start from first row. Is there any way to make it works using DAX?
I'm really new to DAX, i would appreciate it if you can also give the example of the code.Thanks in advance!
Hi @Farrah24 ,
Try the following:
AppTotals = GENERATESERIES(1, DISTINCTCOUNT('Index APP'[APP NAME]), 1)
APPS Names =
VAR _tempTable =
TOPN (
MAX ( AppTotals[AppTotals] ),
SUMMARIZE ( 'Index APP', 'Index APP'[APP NAME], 'Index APP'[Date], Zones[Zone] ),
'Index APP'[APP NAME], DESC
)
VAR _RowCount =
COUNTROWS (
DISTINCT ( SELECTCOLUMNS ( _tempTable, "DDD", 'Index APP'[APP NAME] ) )
)
VAR _result =
IF (
MAX ( AppTotals[AppTotals] ) <= _RowCount,
MAXX ( TOPN ( 1, _tempTable ), 'Index APP'[APP NAME] )
)
RETURN
IF (
COUNTROWS ( DISTINCT ( 'Index APP'[Date] ) ) > 1,
"",
_result
)
See file attach.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsSo to what I can understand you want to presente all the values that exist correct not based on the app code but using some sort of 1 , 2, 3 ranking is that it?
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsI want to show all column headers (Zone 1, Zone 2, Zone 3 and Zone 4). Since i'm using date as play axis, at one time in a zone there may not be an app that classify to that zone, so the table value for the column in that zone will be empty and i want to show that. For example Zone 3 refer to this pic. Zone 3 shown up as column header even though there's no value on that column
I've tried to follow your instruction and got result like this where the zone 2 and zone 3 column header didn't show up. And for the app name in zone 1 start to written from second row which should start from the first row. Like "App-14" that start written in second row rather than first row.
Is there any way to make it written from the first row and all the column header shown up even though there's no value in it?
Thankyou for the time you've invested to guide me! Looking forward for your reply!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
104 | |
101 | |
79 | |
72 | |
64 |
User | Count |
---|---|
142 | |
108 | |
101 | |
81 | |
74 |