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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Invisibleman
Helper II
Helper II

Can you use selectedmeasure without Tabular Editor??

Dear all,

 

I am looking at the function selectedmeasure. But when I am searching the internet, then I only see the videos, where they are using the Tabular Editor to create Calculation Groups and in this Tabular Editor they then using the selectedmeasure.

 

But can this selectedmeasure also work without this Tabular Editor and/or Calculation Group? 

 

That I can create a Selected measure in a Power BI measure, 

SelMeasure = TOTALQTD(SELECTEDMEASURE()),DateTime[DateKey], ALL('DateTime'), "6/30")

SourceMeasure1 = sum([Amount])
SourceMeasure2 = sum([QTY])

ResultMeasure = switch(
   "Amount", SelMeasure(SourceMeasure1),
   "QTY", SelMeasure(SourceMeasure2)

)

 

Or something like this??

 

Regards,

Hans
   

2 ACCEPTED SOLUTIONS
tamerj1
Community Champion
Community Champion

Hi @Invisibleman 

manually created a disconnected table that contains two values ("Amount" and "Qty") which ahall be used as a slicer or a matrix visual then the result measure would be

ResultMeasure =
SWITCH (
SELECTEDVALUE ( MeasureSelection[Measure] ),
"Amount", [SourceMeasure1],
"QTY", [SourceMeasure2]
)

the SelMeasure would be 

SelMeasure =
TOTALQTD ( [ResultMeasure], DateTime[DateKey] )

View solution in original post

Hello tamerj1,

 

Sorry for the late reply, but I had to test and see how to get it the way I wanted to have. The answer, is not same as I was thinking when I asked the question. As I was more thinking about the command selectedmeasure, that will replace the measurename so you would get selectedmeasure[amount'] or selectedmeasure[QTY]. But when looking back, this is my own mistake and should explain better.

 

That said, your answer did help me a lot. I now can make only 1 measure for the formula I want need (like totalMTD, totalQTD & TotalYTD) and then based on your example, I can make it that multiple databases/tables can address this and I am getting the correct result.

 

So even not exactly that what I was looking for, it is still very workable and helpfull.

 

thanks again,

 

Hans

 

View solution in original post

2 REPLIES 2
tamerj1
Community Champion
Community Champion

Hi @Invisibleman 

manually created a disconnected table that contains two values ("Amount" and "Qty") which ahall be used as a slicer or a matrix visual then the result measure would be

ResultMeasure =
SWITCH (
SELECTEDVALUE ( MeasureSelection[Measure] ),
"Amount", [SourceMeasure1],
"QTY", [SourceMeasure2]
)

the SelMeasure would be 

SelMeasure =
TOTALQTD ( [ResultMeasure], DateTime[DateKey] )

Hello tamerj1,

 

Sorry for the late reply, but I had to test and see how to get it the way I wanted to have. The answer, is not same as I was thinking when I asked the question. As I was more thinking about the command selectedmeasure, that will replace the measurename so you would get selectedmeasure[amount'] or selectedmeasure[QTY]. But when looking back, this is my own mistake and should explain better.

 

That said, your answer did help me a lot. I now can make only 1 measure for the formula I want need (like totalMTD, totalQTD & TotalYTD) and then based on your example, I can make it that multiple databases/tables can address this and I am getting the correct result.

 

So even not exactly that what I was looking for, it is still very workable and helpfull.

 

thanks again,

 

Hans

 

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.