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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Mal_Sondh
Helper II
Helper II

Slicing data and returning the text for the latest period

Hi,

I would like to create slicer to switch between different RAG notes, rather than having to create separate visuals from them all:

 

Data is as follows (Projects Main):

 

DateProject CodeOverall NotesBudget NotesDelivery Notes
Jan-21123No issuesBudget has no issuesDelivery is on track
Jan-21543Delivery at risk due to No UI  resourceNo Budget IssuesStill looking for a devloper to complete the UI
Jan-21999Scope increased with Budgetary concernsScope has been increased which has caused for us to now re-budgetCurrent scope deilvery on time, although at risk due to scope increase
Feb-21123No overall issuesNo issuesNo issues
Feb-21543UI person has been recruited, looking to pull back timelines on deliveryNoneUI person is now onboard and looking to pull delivery to original timelines
Feb-21999NoneNoneNone

 

I have created a static table that just lists the following (Latest Notes):

RAG Note Type:

Overall Notes

Budget Notes

Delivery Notes

 

Depending on the date selected on the top page filter, i would like to return the notes aligned to that period.

 

For instance if i had selected Jan-21 in the report filter and Project 123 then i would expect to see all Jan-21 Notes related to this project - but switchable using the slicer as shown in the attachment.

 

Screenshot 2021-07-06 at 12.21.26.png

 

I created measures for each of the notes:

Budget Notes = Calculate (Max('Projects Main'[budgetnotes]))

Delivery Notes = Calculate (Max('Projects Main'[deliverynotes]))

Overall Notes = Calculate (Max('Projects Main'[overallnotes]))

 

I then created a calculated column:

 

Slicer Selection = 

If( ISCROSSFILTERED('Latest Notes'[RAG Note Type]),

SWITCH(SELECTEDVALUE ('Latest Notes'[RAG Note Type]),

"Budget", [Budget Notes],

"Delivery", [Delivery Notes],

"Overall", [Overall Notes])

)

 

I then added the slicer selection into a field on a text visual - however it doesnt return what i expect.

Any help would be appreaciated 

1 ACCEPTED SOLUTION
Mal_Sondh
Helper II
Helper II

I have resolved it - 

 

Slicer Selection = 

If( ISCROSSFILTERED('Latest Notes'[RAG Note Type]),

SWITCH(SELECTEDVALUE ('Latest Notes'[RAG Note Type]),

"Budget Notes", [Budget Notes],

"Delivery Notes", [Delivery Notes],

"Overall Notes", [Overall Notes])

)

View solution in original post

1 REPLY 1
Mal_Sondh
Helper II
Helper II

I have resolved it - 

 

Slicer Selection = 

If( ISCROSSFILTERED('Latest Notes'[RAG Note Type]),

SWITCH(SELECTEDVALUE ('Latest Notes'[RAG Note Type]),

"Budget Notes", [Budget Notes],

"Delivery Notes", [Delivery Notes],

"Overall Notes", [Overall Notes])

)

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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