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
qmartiny
Helper III
Helper III

How to display multiple measures at once in a table (created with SWITCH(ALLSELECTED) + slicer ?)

Hello,

 

I hope you can help.

 

I have set up a slicer + measure combo to display a measure based on quarter selected. 

 

ex  :

q_select= IF(HASONEVALUE(quarter_select[Measure]),SWITCH(ALLSELECTED(quarter_select[Measure]),"Q1",[Q1#],"Q2",[Q2 #],"Q3",[Q3 #], "Q4", [Q4 #], "YTD",[YTD]))

Currently if the user wants the combined Q I set up YTD to be the sum of all Q.
 
However I get the ask to display Q1,Q2,Q3,Q4 separately in a table (eachcolumn a quarter).
 
Any idea how to achieve this ? 
 
Thanks a lot for your help. 
 
Quentin

 

1 ACCEPTED SOLUTION

Hi @qmartiny 

You could use two button to switch between each Quarter meausre or all quarter measures to show on a table.

Capture17.JPGCapture18.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-juanli-msft
Community Support
Community Support

Hi @qmartiny 

If you have a table with dates and value column, 

you could create a date table,

date =
ADDCOLUMNS (
    CALENDARAUTO (),
    "year", YEAR ( [Date] ),
    "month", MONTH ( [Date] ),
    "quarter", IF (
        MONTH ( [Date] ) <= 3,
        "Q1",
        IF ( MONTH ( [Date] ) <= 6, "Q2", IF ( MONTH ( [Date] ) <= 9, "Q3", "Q4" ) )
    )
)

Capture9.JPG

add "quarter" from "date table" to the matrix "column" field,

Capture10.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Maggie @v-juanli-msft 

 

The problem I am facing is that the values I want to show exist only as measures with (CALCULATE(DISTINCTCOUNT, FILTER)) logic.

There is no direct link between a date and a measure for example. The business looks at quarter achievement based on multiple factors.

 

I have this quarter select measure to toggle between each measure based on slicer.

 

But now I want to show each measure at once in the same table.

 

That';s the issue I am facing.

 

Thanks again

 

Q

Hi @qmartiny 

You could use two button to switch between each Quarter meausre or all quarter measures to show on a table.

Capture17.JPGCapture18.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

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.