Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I have a table that holds uniqueasset and asset age and I am trying to create a dynamic filter in order to show the Top 15% of the oldest assets. I created a uniquerank column since there are many duplicates of asset age.
Measures created:
UniqueRank =
RANKX(
Data,
Data[asset age] * 1000000 + Data[Index],
,
DESC,
DENSE
)
TotalAssets = COUNTROWS(ALL(Data))
Top15PercentCount = CEILING([TotalAssets] * 0.15, 1)
Top15PercentThresholdRank =
CALCULATE(
MAXX(
TOPN([Top15PercentCount], ALL(data), data[UniqueRank], DESC),
data[UniqueRank]
)
)
I then created a column to use as a filter:
IsTop15Percent =
IF(
MAX(data[UniqueRank]) <= [Top15PercentThresholdRank],
1,
0
)
However, when I use as a filter it is placing all assets/rows into the Top 15% when I believe it should be flagging 1,876 of them.
What am I doing incorrectly? pbix file here: Top 15 Percent Oldest Assets
TIA!
Solved! Go to Solution.
Hi,
PBI file attached.
Hope this helps.
Hi,
Please check the below picture and the attached pbix file.
Hi,
Please check the below picture and the attached pbix file.
@Ashish_Mathur Your method also appears to work, however I did not try it in my actual data model, but your example is correct. Thank you!
You are welcome.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 43 | |
| 39 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 63 | |
| 32 | |
| 30 | |
| 23 |