Forum Discussion
haurg
3 years agoNew Member
Legend from dynamic measure
Hi, I want to split this stacked line chart by the measure `cat`. Problems: (1) But I cannot select a measure as a legend. I tried to work with field parameters, but failed. (2) ...
NaveenGandhi
Memorable Member
3 years agoWIll summarizing the table is fine with you, as it would take care of multiple entries for one campaign per day. Can you try the below Dax as a new table and Check?
Lengend = SUMMARIZE(SUMMARIZE(z_cat_test,z_cat_test[campaign_name],z_cat_test[date],"Sales",SUM(z_cat_test[sales]),"ad spend",sum(z_cat_test[ad_spend]),"acos_test",DIVIDE(SUM(z_cat_test[sales]),sum(z_cat_test[ad_spend]),BLANK())),z_cat_test[campaign_name],z_cat_test[date],[Sales],[ad spend],[acos_test],"cat",SWITCH(TRUE(),SUM(z_cat_test[sales]) > 0 && [acos_test] >= 1, "ACoS >= 1",SUM(z_cat_test[sales]) > 0 && [acos_test] < 0.3, "ACoS < 0.3",SUM(z_cat_test[sales]) = 0, "No revenue","Other"))
haurg
3 years agoNew Member
When I summarize it by day, what do I do in order to summarize it by week, month, year?
Any chance we can work with field parameters etc.?
- NaveenGandhi3 years ago
Memorable Member
You still have the date in summarized table, you can use that to create date hierarchy and visualize it by week, month and year
I don't think field parameters will be useful for this scenario.