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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Isgandar_B
Frequent Visitor

Different output of slicer

Hi Community,

I was 2 problems looking very similar, one of them i already solve, just in case of explanation i will explain it for first.

I have different measures in table, and have goal to make work pie chart (just for example) refering to my selection in top, 
Basicly like - If i select in top slicer Measure1, let me all pie chart calculations according this, if Measure 2 related to this, so it's works and i very like it.

Isgandar_B_0-1663934342824.png

I create table with selections and use this formula

Value selection = IF(
HASONEVALUE(MeasuresTable[Types]),
SWITCH(
VALUES(MeasuresTable[Types]),
"MSU", SUM(Data[MSU]),
"Gross", SUM(Data[Gross]),
"NET2", SUM(Data[NET2])
),
SUM(Data[MSU])
)

And lets get to my second issue

I have calendar table with month, date and so on. 
So according to some reasons i need get data some time for Calendar year, some time for Fiscal year.
How looks my table.
Isgandar_B_1-1663934439255.png

 

So what i want: i want make slicer selection on top of my page with 2 selections Fiscal year and Calendar year.
And if i select fiscal year it's must get to here FY_year columns, another case CY_year
Isgandar_B_2-1663934541315.png

 

I try to do this as described my first problem resolution via switch, but problem that i don't now how to refer to column, if i can do as described above formula it will be easiyer for me, but i can't use just column name insted of SUM calculation.

Kindly ask you help to me with this.



1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

@Isgandar_B Maybe try creating a disconnected table for your slicer and then you can use SELECTEDVALUE along with SWITCH to return the right values in your measure.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

1 REPLY 1
Greg_Deckler
Super User
Super User

@Isgandar_B Maybe try creating a disconnected table for your slicer and then you can use SELECTEDVALUE along with SWITCH to return the right values in your measure.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.