Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Naveennegi119
Helper III
Helper III

Hide value

Hi All,

 

It really very complicated to me to resovle.

 

when I select sub then it show fine top 3 value (situation 1)

 

 for attachment.JPG

 

But when i select both(sub and sub category), it show the value sub and sub category. see below:-

 For attachment2.JPG

 

 

 

Concatenate = CONCATENATE(Test[Sub],Test[Sub Category])

 

data for use(it showing error massage cannot exceed 20,000 charactars) that's why image attached

concatenate.JPG

 

NICK
Regards, 

1 ACCEPTED SOLUTION

Hello,

 

I couldn't test 'Dense' last week so I did it today.

 

My Measure is TopN:=CALCULATE(MAX(Test_Rank[Data]);FILTER(Test_Rank;RANKX(Test_Rank;[Data];;;Dense)=Top_3[MaxN]))

 

This is my over all:

image.png

 

For me it looks like it is supposed.

View solution in original post

15 REPLIES 15
Floriankx
Solution Sage
Solution Sage

Hello why don't you rank all your data with a measure and then let the slicer do the rest?

 

 

TopN:=CALCULATE(MAX(Test_Rank[Data]);FILTER(Test_Rank;RANKX(Test_Rank;[Data])=[MaxN]))

 

MaxN:=Max(Top_3[ID] which is a simple table containing heading and the values from 1 to 3.

 

Hi @Floriankx

 

thanks for sharing idea,

 

but rankx give same number for duplicate data

 

Regards,

NICK

Hello can you make a screenshot?

 

 

Hi @Floriankx,

 

ss.JPG

your formula gives me max value of A & B,

not give 2nd max and 3rd max.

 

let me clear once again what i need

Condition - 1

if I select sub slicer then I get top 3 value of data. I'm using index method for that and i get top 3 value of sub, So first situation is done

 

But

Condition - 2

when I select Both(Sub and Sub category) then I get top 3 value of data using the same method of index, that's fine too (as you see my previous attach images)

 

Now problem is when i go with condition - 2  condition - 1 also appearing

that what i what to hide

Using condition-1 condition-2 hide

Using condition-2 conditon-1 hide

 

Hope u understand what i'm saying

 

Regards,

NICK

 

 

Hello,

 

Your MaxN is wrong. I ignored your calculated column and tried to build an independent measure only needing the columns category, sub category and Data.

MaxN should relate to an independent table, which helps you to create Max1, Max2, Max3.

If you want to display Situation 1 only if now Sub Category is selected, maybe this helps:

Situation 1: IF(NOT(HASONEVALUE([Sub Category])),[TopN],BLANK())

Situation 2: IF((HASONEVALUE([Sub Category])),[TopN],BLANK())

 

Maybe this helps.

Hi @Floriankx,

 

I'm confuse with MaxN

 

How I get Max1, Max2 & Max3

 

can u please sent a screenshot

 

Regards,

NICK

Hello, I do have them as column in my pivot table.

A is sliced.

 

image.png

Hi @Floriankx,

 

you giving me solution

 

I want to know how i get solution step by step

 

Regards,

NICK

Hello I try to walk you through:

 

I have a table (extract of your big one) Test_Rank

SubSub CategoryData
AGH99
BIJ96
BIJ95
ACD94
AEF90
BKL89
AEF87
AGH95

 

Then I do have another table Top_3

Top 3
1
2
3

 

Tables are not related.

In Top_3 i have the measure MaxN:=MAX(Top_3[Top 3])

 

In Test_Rank I have TopN:=CALCULATE(MAX(Test_Rank[Data]);FILTER(Test_Rank;RANKX(Test_Rank;[Data])=Top_3[MaxN]))

MAX is just for aggregation, Filter should return only one value but it has to be wrapped by aggregation funtion (Min, Max, Sum, etc. I don't recommend Sum in case Filter returns more values, duplicats e.g.)

Filter is for Filtering. RANKX ranks your Data. In combination only the value is filtered of TopN value is selected depending on MaxN.

 

If I create PivotTable with this data it returns the result as shown before. I hope things are clearer now.

 

Best regards.

 

 

Hi @Floriankx,

 

sorry for late

 

I understand what u trying to teach me

 

but I told u before if data is duplicate then rankx gives same number for data.

 

Note:- make some value duplicates in data

 
Sub
 
Sub Category
 
Data
ACD94
ACD94
ACD69
ACD55
ACD53
AEF90
AEF87
AEF87
AEF71
AEF53
AGH99
AGH99
AGH78
AGH75
AGH62
BIJ96
BIJ95
BIJ77
BIJ69
BIJ61
BKL89
BKL87
BKL64
BKL63
BKL60
BMN81
BMN80
BMN77
BMN61
BMN56

 

Result I get :-

HIde value.JPG

See Max2 is not showing because of duplicate data (max1 - 99 & Max2 - 99).

 

hide value2.JPG

Similar case in Sub category.

 

formula.JPG

 

Any suggestion (how I achieve my original situation)

 

Regards,

NICK

Hello I see,

 

but PowerPivot is simply amazing, I think there is an OnBoard Solution.

Check out RANKX RANKX(<table>, <expression>[, <value>[, <order>[, <ties>]]])

 

So you could add RANKX(Test_Rank;[Data];;Dense)

I think the description in the link is well done. So this should help.

Hi @Floriankx,

 

RANKX(Test_Rank;[Data];;Dense)

 

Not working in my case. please try to use once in your side.

 

Maybe some important thing u get

 

Regards,

NICK

 

 

Hello,

 

I couldn't test 'Dense' last week so I did it today.

 

My Measure is TopN:=CALCULATE(MAX(Test_Rank[Data]);FILTER(Test_Rank;RANKX(Test_Rank;[Data];;;Dense)=Top_3[MaxN]))

 

This is my over all:

image.png

 

For me it looks like it is supposed.

Hi @Floriankx,

 

I was gone to trip, so could not read your msg.

 

Thanks for every help you did it in past few days.

 

Regards,

NICK

Hi all,

 

help to out this guyz.

 

 

Regards,

NICK

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.