//Detail query 1 DEFINE VAR __DS0FilterTable = FILTER(KEEPFILTERS(VALUES(‘nyc_yellowtaxi'[startLat])), ‘nyc_yellowtaxi'[startLat] <> 0) VAR __DS0FilterTable2 = FILTER( KEEPFILTERS(VALUES(‘nyc_yellowtaxi'[tpepPickupDateTime])), ‘nyc_yellowtaxi'[tpepPickupDateTime] < DATE(2016, 1, 2) ) VAR __DS0Core = SUMMARIZECOLUMNS( ROLLUPADDISSUBTOTAL( ROLLUPGROUP(‘nyc_yellowtaxi'[startLat], ‘nyc_yellowtaxi'[startLon]), “IsGrandTotalRowTotal” ), __DS0FilterTable, __DS0FilterTable2, “SumtotalAmount”, CALCULATE(SUM(‘nyc_yellowtaxi'[totalAmount])), “SumtipAmount”, CALCULATE(SUM(‘nyc_yellowtaxi'[tipAmount])), “SumtollsAmount”, CALCULATE(SUM(‘nyc_yellowtaxi'[tollsAmount])) ) VAR __DS0PrimaryWindowed = TOPN( 502, __DS0Core, [IsGrandTotalRowTotal], 0, ‘nyc_yellowtaxi'[startLat], 1, ‘nyc_yellowtaxi'[startLon], 1 ) EVALUATE __DS0PrimaryWindowed ORDER BY [IsGrandTotalRowTotal] DESC, ‘nyc_yellowtaxi'[startLat], ‘nyc_yellowtaxi'[startLon] | 844 |
//Detail query 2 DEFINE VAR __DS0FilterTable = FILTER(KEEPFILTERS(VALUES(‘nyc_yellowtaxi'[startLat])), ‘nyc_yellowtaxi'[startLat] <> 0) VAR __DS0FilterTable2 = FILTER( KEEPFILTERS(VALUES(‘nyc_yellowtaxi'[tpepPickupDateTime])), ‘nyc_yellowtaxi'[tpepPickupDateTime] < DATE(2016, 1, 2) ) VAR __DS0Core = SUMMARIZECOLUMNS( ROLLUPADDISSUBTOTAL( ROLLUPGROUP(‘nyc_yellowtaxi'[startLat], ‘nyc_yellowtaxi'[startLon]), “IsGrandTotalRowTotal” ), __DS0FilterTable, __DS0FilterTable2, “SumtotalAmount”, CALCULATE(SUM(‘nyc_yellowtaxi'[totalAmount])), “SumtipAmount”, CALCULATE(SUM(‘nyc_yellowtaxi'[tipAmount])), “SumtollsAmount”, CALCULATE(SUM(‘nyc_yellowtaxi'[tollsAmount])) ) VAR __DS0PrimaryWindowed = TOPN( 502, __DS0Core, [IsGrandTotalRowTotal], 0, ‘nyc_yellowtaxi'[startLat], 1, ‘nyc_yellowtaxi'[startLon], 1 ) EVALUATE __DS0PrimaryWindowed ORDER BY [IsGrandTotalRowTotal] DESC, ‘nyc_yellowtaxi'[startLat], ‘nyc_yellowtaxi'[startLon] | 860 |
//Detail query 3 DEFINE VAR __DS0FilterTable = FILTER(KEEPFILTERS(VALUES(‘nyc_yellowtaxi'[startLat])), ‘nyc_yellowtaxi'[startLat] <> 0) VAR __DS0FilterTable2 = FILTER( KEEPFILTERS(VALUES(‘nyc_yellowtaxi'[tpepPickupDateTime])), ‘nyc_yellowtaxi'[tpepPickupDateTime] < DATE(2016, 1, 2) ) VAR __DS0Core = SUMMARIZECOLUMNS( ROLLUPADDISSUBTOTAL( ROLLUPGROUP(‘nyc_yellowtaxi'[startLat], ‘nyc_yellowtaxi'[startLon]), “IsGrandTotalRowTotal” ), __DS0FilterTable, __DS0FilterTable2, “SumtotalAmount”, CALCULATE(SUM(‘nyc_yellowtaxi'[totalAmount])), “SumtipAmount”, CALCULATE(SUM(‘nyc_yellowtaxi'[tipAmount])), “SumtollsAmount”, CALCULATE(SUM(‘nyc_yellowtaxi'[tollsAmount])) ) VAR __DS0PrimaryWindowed = TOPN( 502, __DS0Core, [IsGrandTotalRowTotal], 0, ‘nyc_yellowtaxi'[startLat], 1, ‘nyc_yellowtaxi'[startLon], 1 ) EVALUATE __DS0PrimaryWindowed ORDER BY [IsGrandTotalRowTotal] DESC, ‘nyc_yellowtaxi'[startLat], ‘nyc_yellowtaxi'[startLon] | 1,213 |
//Detail query 4 (All Columns) DEFINE VAR __DS0FilterTable = FILTER(KEEPFILTERS(VALUES(‘nyc_yellowtaxi'[startLat])), ‘nyc_yellowtaxi'[startLat] <> 0) VAR __DS0FilterTable2 = FILTER( KEEPFILTERS(VALUES(‘nyc_yellowtaxi'[tpepPickupDateTime])), ‘nyc_yellowtaxi'[tpepPickupDateTime] < DATE(2016, 1, 2) ) VAR __ValueFilterDM1 = FILTER( KEEPFILTERS( SUMMARIZECOLUMNS( ‘nyc_yellowtaxi'[startLat], ‘nyc_yellowtaxi'[startLon], ‘nyc_yellowtaxi'[paymentType], ‘nyc_yellowtaxi'[vendorID], ‘nyc_yellowtaxi'[improvementSurcharge], ‘nyc_yellowtaxi'[doLocationId], ‘nyc_yellowtaxi'[puLocationId], ‘nyc_yellowtaxi'[storeAndFwdFlag], ‘nyc_yellowtaxi'[tpepDropoffDateTime], ‘nyc_yellowtaxi'[tpepPickupDateTime], __DS0FilterTable, __DS0FilterTable2, “SumtotalAmount”, CALCULATE(SUM(‘nyc_yellowtaxi'[totalAmount])), “SumtipAmount”, CALCULATE(SUM(‘nyc_yellowtaxi'[tipAmount])), “SumtollsAmount”, CALCULATE(SUM(‘nyc_yellowtaxi'[tollsAmount])), “SumpassengerCount”, CALCULATE(SUM(‘nyc_yellowtaxi'[passengerCount])), “SumtripDistance”, CALCULATE(SUM(‘nyc_yellowtaxi'[tripDistance])), “SumendLat”, CALCULATE(SUM(‘nyc_yellowtaxi'[endLat])), “SumendLon”, CALCULATE(SUM(‘nyc_yellowtaxi'[endLon])), “Sumextra”, CALCULATE(SUM(‘nyc_yellowtaxi'[extra])), “SumfareAmount”, CALCULATE(SUM(‘nyc_yellowtaxi'[fareAmount])), “SummtaTax”, CALCULATE(SUM(‘nyc_yellowtaxi'[mtaTax])), “SumpuMonth”, CALCULATE(SUM(‘nyc_yellowtaxi'[puMonth])), “SumpuYear”, CALCULATE(SUM(‘nyc_yellowtaxi'[puYear])), “CountrateCodeId”, CALCULATE(COUNTA(‘nyc_yellowtaxi'[rateCodeId])) ) ), [SumtollsAmount] > 0 ) VAR __DS0Core = SUMMARIZECOLUMNS( ROLLUPADDISSUBTOTAL( ROLLUPGROUP( ‘nyc_yellowtaxi'[startLat], ‘nyc_yellowtaxi'[startLon], ‘nyc_yellowtaxi'[paymentType], ‘nyc_yellowtaxi'[vendorID], ‘nyc_yellowtaxi'[improvementSurcharge], ‘nyc_yellowtaxi'[doLocationId], ‘nyc_yellowtaxi'[puLocationId], ‘nyc_yellowtaxi'[storeAndFwdFlag], ‘nyc_yellowtaxi'[tpepDropoffDateTime], ‘nyc_yellowtaxi'[tpepPickupDateTime] ), “IsGrandTotalRowTotal” ), __DS0FilterTable, __DS0FilterTable2, __ValueFilterDM1, “SumtotalAmount”, CALCULATE(SUM(‘nyc_yellowtaxi'[totalAmount])), “SumtipAmount”, CALCULATE(SUM(‘nyc_yellowtaxi'[tipAmount])), “SumtollsAmount”, CALCULATE(SUM(‘nyc_yellowtaxi'[tollsAmount])), “SumpassengerCount”, CALCULATE(SUM(‘nyc_yellowtaxi'[passengerCount])), “SumtripDistance”, CALCULATE(SUM(‘nyc_yellowtaxi'[tripDistance])), “SumendLat”, CALCULATE(SUM(‘nyc_yellowtaxi'[endLat])), “SumendLon”, CALCULATE(SUM(‘nyc_yellowtaxi'[endLon])), “Sumextra”, CALCULATE(SUM(‘nyc_yellowtaxi'[extra])), “SumfareAmount”, CALCULATE(SUM(‘nyc_yellowtaxi'[fareAmount])), “SummtaTax”, CALCULATE(SUM(‘nyc_yellowtaxi'[mtaTax])), “SumpuMonth”, CALCULATE(SUM(‘nyc_yellowtaxi'[puMonth])), “SumpuYear”, CALCULATE(SUM(‘nyc_yellowtaxi'[puYear])), “CountrateCodeId”, CALCULATE(COUNTA(‘nyc_yellowtaxi'[rateCodeId])) ) VAR __DS0PrimaryWindowed = TOPN( 502, __DS0Core, [IsGrandTotalRowTotal], 0, ‘nyc_yellowtaxi'[startLat], 1, ‘nyc_yellowtaxi'[startLon], 1, ‘nyc_yellowtaxi'[paymentType], 1, ‘nyc_yellowtaxi'[vendorID], 1, ‘nyc_yellowtaxi'[improvementSurcharge], 1, ‘nyc_yellowtaxi'[doLocationId], 1, ‘nyc_yellowtaxi'[puLocationId], 1, ‘nyc_yellowtaxi'[storeAndFwdFlag], 1, ‘nyc_yellowtaxi'[tpepDropoffDateTime], 1, ‘nyc_yellowtaxi'[tpepPickupDateTime], 1 ) EVALUATE __DS0PrimaryWindowed ORDER BY [IsGrandTotalRowTotal] DESC, ‘nyc_yellowtaxi'[startLat], ‘nyc_yellowtaxi'[startLon], ‘nyc_yellowtaxi'[paymentType], ‘nyc_yellowtaxi'[vendorID], ‘nyc_yellowtaxi'[improvementSurcharge], ‘nyc_yellowtaxi'[doLocationId], ‘nyc_yellowtaxi'[puLocationId], ‘nyc_yellowtaxi'[storeAndFwdFlag], ‘nyc_yellowtaxi'[tpepDropoffDateTime], ‘nyc_yellowtaxi'[tpepPickupDateTime] | 4,240 |