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
migss
Regular Visitor

Converting measures into categories - works but not with measures from datasets

Hi, 

I have a bunch of calculated measures that I converted into categories in a table following the procedure discussed in this post:


This worked well for measures created from tables that were imported into the model from a SQL server. I tried to use the same method with measures that were imported as part of a Power BI dataset and the new measure itself was created without any errors. However, if I use the new measure in a visual, the visual won't display and the following error message is returned:
 

Couldn't load the data for this visual.  OLE DB or ODBC error: Query (5, 1) The column 'Value' specified in the 'GROUPCROSSAPPLY' function was not found in the input table.

 

Can someone please explain to me what is causing the error and if there is a way to get around this?
 
Thanks.
 
Migs S.
1 REPLY 1
Anonymous
Not applicable

Hi @migss 
I am having same problem 

Set up is following:
I have Direct Queries to 2 different datasets and one small simple table in local dataset
Visual should show ID of simple local table and measure with following definition.
As shown i am just calling measures from different datasets for different IDs of local table

Measure MTD = 
SWITCH(
    SELECTEDVALUE('Simple Table'[Id],1)
    ,1,[Total Visits GA [#]] AC] -- measure from first dataset
    ,2,[Sessions [#]]] -- measures from second dataset
)





 

 


image.png

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.

Top Solution Authors