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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
LucaixBolha
Resolver I
Resolver I

How to do a new column with string values that come from different segmentations on the same data

Hello! 

 

I have a database going under three different types of segmentation (via slicer/buttons): 

1) The rank selectors on green that I can choose or not to be applied;
2) The pink "Top N" slicer, which allows me to restrain the number of Asset Codes displayed at each one of the four white visuals on the top of the page;
3) The four orange slicers that allow me to restrain values if I want to (what also automatically rearrange the ranks at the four white visuals).

My goal is to generate dynamically (after I choose whichever selections at any or all of the 3 segmentation levels) a table/column/slicer/anything that shows me the Assets Code contained in all white visuals, gathered in one place, just like the table in the blue visual (I applied a filter level to build an example of the final result).

LucaixBolha_0-1658330987130.png

 

Here is the file of the pbix: https://drive.google.com/file/d/1N_g1fl5zkXibp6vNwy9s_oBifJCiGu0n/view?usp=sharing

Does anyone have a clue how to solve this issue?
Tks! 🙏

  

1 ACCEPTED SOLUTION

I got the idea! Thanks @lbendlin , Ill try to make it work! 🙏

View solution in original post

6 REPLIES 6
lbendlin
Super User
Super User

Your example uses a combination of filters ( AND ).

lbendlin_0-1658543596723.png

By coincidence it matches the values in the other tables, but what you actually want to achieve is a collection of independent results ( OR ).  You can only do that with a measure that tests for 

 

[Market Value] > 0 || [Negotiation Volume] > 0 || [P/BV]> 0 || [Volatility] > 0

 

The ||  is what DAX uses for " OR " .

Hi @lbendlin , thanks for your answer! Ahh these filters were "leftovers" from an earlier attempt of mine, in fact the reason why it matches exactly the values in the other tables is because I've filtered the Asset List in order to show the selected values, here:

LucaixBolha_0-1658707927372.png


Using your description, my goal would be an (AND) filter type, like if I told Power Bi to do this:

"Give me a column that aggregates dynamically the names of the Assets filtered by:
           - the P/BV ranking (AND);
           - the ones filtered by the Market Value ranking (AND)
           - the ones filtered by the Negotiation Volume ranking (AND)
           - the ones filtered by the Volatility ranking

I just have no ideia how it could be done with DAX 😅

Let me repeat - what you need is an OR filter, not an AND filter.

Hmm I see 🤔 ...I understand the idea of a collection of independent results, but when I tried it showed me this: 

LucaixBolha_0-1658750564222.png

TTEN3 is the only Asset Code that appears because it is the only one that is within the range established by the four orange slicers. Were you picturing something like this (a calculate measure, applying the filters as you've mentioned)?
 

Yes, that requires a measure which you then use as a filter on the visual

I got the idea! Thanks @lbendlin , Ill try to make it work! 🙏

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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