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, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
fazhong
Microsoft Employee
Microsoft Employee

Create a slicer to see all data vs one part of data

Hi, I want to create a slicer to filter my data. These data are detail data set A . I extracted newest data B from them with a column isNewest flagged to `True`. I want a slicer user can select "Detail" vs "Newest" to see data set A or B( B ⊆ A).

 

I found if or switch in DAX is not filt this situration, because if a data goes into if sentence or first swithc case, it will not goes into second sentence.

 

Can you help me with this? Thanks

 

The format  of data which comming into PowerBI is like this:

PullRequestId, PRIteration, service result...

 

After adding some columns in PowerBI, the format is:

PullRequestId, PRIteration, service result... MaxIterationOfThisPR, isNewestIteration

 

To see our service result in powerBI page, we need to organize data by each iteration or each PR(we take the data with max iteration from that PR as the service result for that PR). So we want to add a slicer, it has two options, if user select the first option, all data will shows up; if user select the second option, it will only show the lines with isNewestIteration is "True".

4 REPLIES 4
robindlc
Frequent Visitor

Wel, I'm facing what I thing is a similar problem, which I guess will have an easy solution, but so far I did not find it.

 

I put my example, Imagine I have a visual with all invoices pending of paymet made to X (no matter whether is a client or all invoices to a copuntry or agent...) and I want a filter / button to, when selected, see only the matured invoices...

 

So it is a case of showing everything (all data, all pending invoices) ot just a part of such everything (only the matured incoices).

 

We have metrics such date of maturity, number of days an invoice is matured and so on....  what I need is how to allow the user to filter between "all" and "matured"

v-lionel-msft
Community Support
Community Support

Hi @fazhong ,

 

Please show an example of the data used by the slicer and explain what value visuals return when the slicer is selected.

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@fazhong , Not very clear, But overlap in the same column, I doubt you can have

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

I've added some details. The file is not in my hand now. If you want more infomation, please tell me.

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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