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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.