Forum Discussion
All value in measure
Hello everyone,
I'm still here asking for your help. I have a dax measure like
CALCULATE ((SUM (RAPPORTINO_DAY_F [DWH_RAP_MEA_MIN_ORDINARI])) / 60) / 8, FILTER (RAPPORTINO_DAY_F, IF (RAPPORTINO_DAY_F [Job / Center] = "Centers", not RAPPORTINO_DAY_F [DWH_ATT_DAY_F, IF (RAPPORTINO_DAY_F [Job / Center] = "Centers", not RAPPORTINO_DAY_F [DWH_ATT_ATT_SEQ_DAY_F] 1197,1290}, RAPPORTINO_DAY_F [DWH_ATT_SEQ] IN {3,4,6,10,11,12,13,14,16,18,20,22,23,24,25,27,31,32,33,36 , 37,38,39,41,42,43,49,51,52,53,54,55,56,58,59,60,61,62,64,65,66,68,69,70,71 , 72,73,75,77,78,79,80,81,82,83,85,87,90,91,93,96,101,102,103,104,109,110,112,117,123,128,129,133,134,136,141,149,159,160,164,169,174,176,181,190,208,238,444.467.500.517.529.535.538.541.545.552..788.790.793.796.802.807.821.823.824.825.829.830.833.834.837.838.847.850.852.855.857.859.860.864.865.866.867.870.871.872.878.887.892.893.895.899.900.902.903.904.906.909.911.913.924.934.930.930.939.941.944.946.953.954.956.958.962.967.973.977.978.979.982.986.988,989,990,1002,1005,1009,1010,1022,1025,1027,1030,1044,1046,1055,1056,1058,1061,1071,1073,1078,1079,1085,1086,1089,109210299,109210299,1,1103,1114,1123,1126,1130,1131,1132,1138,1140,1142,1146,1148,1150,1151,1154,1155,1159,1164,1165,1168,1169,1173,1179,1180,1181,1184,1186,1189,1191,1193,1194,1197,1198,1199,1201,1202,1203,1205,1207,1215,1219,1221,1226,1228,1234,1235,1236,1237,1239,1240,1241,1242,1243,1246,1248,1253,1254,1256,1259,1262,1263,1264,1265,1266,1267,1268,1269,1273,1276,1279,1281,1285,1286,1287, 1289,1290,1292,1295,1298,1299,1300,1302,1303}) && RAPPORTINO_DAY_F [DWH_ATT_SEQ] <> 1248 && RAPPORTINO_DAY_F [DWH_ATT_SEQ] <> 61 && RAPPORTINO_DAY_F [DWH_COM_SEQ)] <> 598)] <>What I would like to try to do is delete all values. The sense of measure is this:
I calculate an expression ratio and I filter a table but in the filter I have to put that if a field = Centers is worth another, otherwise all the values of the column must be valid.
Can you help me?
Thanks
Hi v-yalanwu-msft,
I finally managed to find a solution. I'll bring it back to you so maybe it can be of help to others too.
CALCULATE (
(SUM (RAPPORTINO_DAY_F [DWH_RAP_MEA_MIN_ORDINARI]) / 60) / 8,
FILTER (
RAPPORTINO_DAY_F,
IF (
RAPPORTINO_DAY_F [Order / Center] = "Centers",
NOT RAPPORTINO_DAY_F [DWH_ATT_SEQ]
IN SELECTCOLUMNS (
FILTER (
ACTIVITY_D,
ACTIVITY_D [DWH_ATT_DESC]
IN {
"Passive training (coaching, classroom, etc)",
"Active training",
"Training environment",
"Interns training",
"Active internal training",
"Participation in internal training",
"Compulsory Training"
}
),
"ACTIVITY TO EXCLUDE", ACTIVITY_D [DWH_ATT_SEQ]
),
RAPPORTINO_DAY_F [DWH_ATT_SEQ]
IN SELECTCOLUMNS (ACTIVITY_D, "TEST", ACTIVITY_D [DWH_ATT_SEQ])
)
&& NOT RAPPORTINO_DAY_F [DWH_ATT_SEQ]
IN SELECTCOLUMNS (
FILTER (ACTIVITY_D, ACTIVITY_D [DWH_ATT_DESC] IN {"Waiting for Jobs"}),
"TEST", ACTIVITY_D [DWH_ATT_SEQ]
)
&& NOT RAPPORTINO_DAY_F [DWH_ATT_SEQ]
IN SELECTCOLUMNS (
FILTER (ATTIVITA_D, ATTIVITA_D [DWH_ATT_DESC] IN {"Technical Certifications"}),
"TEST", ACTIVITY_D [DWH_ATT_SEQ]
)
&& NOT RAPPORTINO_DAY_F [DWH_COM_SEQ]
IN SELECTCOLUMNS (
FILTER (ORDER_D, ORDER_D [DWH_COM_CODE] IN {"VSM_ABSENCES"}),
"TEST", ORDER_D [DWH_COM_SEQ]
)
)
)
3 Replies
- v-yalanwu-msft
Community Support
Hi, dwh ;
Can you share a simple example or scenario that illustrates what you want to output? This makes it easier to understand your logic and ideas.
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. - v-yalanwu-msft
Community Support
Hi, dwh ;
Is your problem solved? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- dwh
Helper II
Hi v-yalanwu-msft,
I finally managed to find a solution. I'll bring it back to you so maybe it can be of help to others too.
CALCULATE (
(SUM (RAPPORTINO_DAY_F [DWH_RAP_MEA_MIN_ORDINARI]) / 60) / 8,
FILTER (
RAPPORTINO_DAY_F,
IF (
RAPPORTINO_DAY_F [Order / Center] = "Centers",
NOT RAPPORTINO_DAY_F [DWH_ATT_SEQ]
IN SELECTCOLUMNS (
FILTER (
ACTIVITY_D,
ACTIVITY_D [DWH_ATT_DESC]
IN {
"Passive training (coaching, classroom, etc)",
"Active training",
"Training environment",
"Interns training",
"Active internal training",
"Participation in internal training",
"Compulsory Training"
}
),
"ACTIVITY TO EXCLUDE", ACTIVITY_D [DWH_ATT_SEQ]
),
RAPPORTINO_DAY_F [DWH_ATT_SEQ]
IN SELECTCOLUMNS (ACTIVITY_D, "TEST", ACTIVITY_D [DWH_ATT_SEQ])
)
&& NOT RAPPORTINO_DAY_F [DWH_ATT_SEQ]
IN SELECTCOLUMNS (
FILTER (ACTIVITY_D, ACTIVITY_D [DWH_ATT_DESC] IN {"Waiting for Jobs"}),
"TEST", ACTIVITY_D [DWH_ATT_SEQ]
)
&& NOT RAPPORTINO_DAY_F [DWH_ATT_SEQ]
IN SELECTCOLUMNS (
FILTER (ATTIVITA_D, ATTIVITA_D [DWH_ATT_DESC] IN {"Technical Certifications"}),
"TEST", ACTIVITY_D [DWH_ATT_SEQ]
)
&& NOT RAPPORTINO_DAY_F [DWH_COM_SEQ]
IN SELECTCOLUMNS (
FILTER (ORDER_D, ORDER_D [DWH_COM_CODE] IN {"VSM_ABSENCES"}),
"TEST", ORDER_D [DWH_COM_SEQ]
)
)
)