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
Zu
Helper I
Helper I

create a new measure based on slider selection

a slider next to each table allow s to select the month in each tablea slider next to each table allow s to select the month in each tableHi,

This is result table in ExcelThis is result table in ExcelI need help to create a third table showing the difference between each cell in this two tables. The content of the tables is controled by the Month sliders. In the case of this example, the new table will calculate (Jan-Feb) and data will be showed by level, same for all the other columns. So for level one it will be (376-373)=3. See second image for the third table in Excel.

The columns Staff Count, Ave Tenure; etc. are measures that I created.

I tried to read the values selected in the sliders and use that as parameters for a new measure,based on this article Parameter Table. But is not working, it returns 0 for all levels. Can anyone help with the measure I created or any other solution that will give me a table with the difference cell by cell.

Thanks!Capture3.JPG

 

 

 

 

4 REPLIES 4
ankitpatira
Community Champion
Community Champion

@Zu Since you have two tables with Level columns and same values for each,

 

in power bi desktop go to query editor -> under Home tab -> Combine ribbon -> Merge queries. This will give you values in same table for matching Levels. Then just create a measure to subtract one from another. Can you take this approach ?

 

5.PNG6.PNG

 

 

@ankitpatira: Thanks for your help! this solution won't work for me because the tables that you see in my first post are created in the Report view, they actually don't exist in my Data model. The rows in these tables such as 'Staff Count' is a mesure that I created by counting the raws in my data table. but I don't have a column name 'Staff Count' in my data table. The other limitation is that I have a single data table, see image below. The two tables in the Report view, are based on this single data table (table1) they just display data for different month, depending on the slicer selection. (I have a column Month in my table 1). Is there a way to save the report tables as data tables?Capture4.JPG

Thanks!

 

@Zu

 

The table you created in Report View is only for rendering. It's not supported to save visuals as dataset. You have to do modeling in Data View or "Edit Query".

 

Regards,

@v-sihou-msft

I suspected that Simon, thanks for confirming. Do you have any idea of documentation on how to save data model from a mesure in Power BI?

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.