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
kumsha1
Post Patron
Post Patron

Measure values based on DATE flag (slicer selection)

Hi,

 

I have created below calculated measures that will calculate values for current and previous days based on slicer Date selection. Is it possible to change the matrix table to below required format OR create a Date flag for Current, Previous 24 hrs to use with the measure to change the values dynamically. Thanks in advance !.

Current Format:

kumsha1_1-1606191118881.png

 

Required Format:

kumsha1_0-1606191095704.png

 

6 REPLIES 6
v-yuaj-msft
Community Support
Community Support

Hi @kumsha1 ,

Can you kindly provide me your sample data model or sample data? It couldn't be better if you offer me your formula of calculated measures.

Best Regards,

Yuna

Hi @v-yuaj-msft , how can i share sample .pbix file with you?

Hi @kumsha1 ,

Please share me with your pbix file from your Onedrive for Business. (just post a link as a reply)

Best Regards,
Yuna 

 

v-yuaj-msft
Community Support
Community Support

Hi @kumsha1 ,

 

Based on your description, you can do some steps as follows.

  1. Spilt the first column.

v-yuaj-msft_0-1606293745544.png

 

v-yuaj-msft_1-1606293745546.png

 

  1. Create a table.

 

Table =

ADDCOLUMNS(

    SUMMARIZE(table2,[attribute.1]),

    "Prev", MAXX(FILTER(ALL(table2),[attribute.2]<>BLANK()&&[attribute.1]=EARLIER('table2'[attribute.1])),[percentage]),

    "Current",MAXX(FILTER(ALL(table2),[attribute.2]=BLANK()&&[attribute.1]=EARLIER('table2'[attribute.1])),[percentage])

)

 

Result:

v-yuaj-msft_2-1606293745547.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yuaj-msft , thanks for your reply.

 

All the objects are calculated measures... Hence, not available for column formatting 😞

amitchandak
Super User
Super User

@kumsha1 , You have do measure to dimension converiosn. You have create a table like this and display that in matrix

union(
summarize('Table',"Measure","Sales Growth", "ACT",[Sales Growth], "PY",[Sales Growth PY], "FC",[Sales Growth FC]),
summarize('Table',"Measure","Price Growth", "ACT",[Price Growth], "PY",[Price Growth PY], "FC",[Price Growth FC])
)

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