Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
This CPC column is filtering as I need it to, and there are no errors.
CPC = CALCULATE( COUNT(ImportCubicPM[CPC]),
FILTER(ALL(ImportCubicPM[CPC]),
ImportCubicPM[CPC] = "MP-MONTHLYPM-PM-"))
I have a Measure called (ImportCubicPM[TotMP] which is a static count of 7 units.
I am trying to calculate the difference between these 2 columns, but am receiving an error.
CPC = CALCULATE (ImportCubicPM[TotMP] -
(COUNT(ImportCubicPM[CPC]),
FILTER(ALL(ImportCubicPM[CPC]),
ImportCubicPM[CPC] = "MP-MONTHLYPM-PM-")))
The error is "Operator or expression '()' is not supported in this context.
Thanks,
Mike
This works when I subtract 2 columns
CPC = CALCULATE (Drive_Station[TotMP] - (COUNT(ImportCubicPM[CPC])))
This works when I Filter a column
CPC = CALCULATE(COUNT(ImportCubicPM[CPC]), FILTER(ALL(ImportCubicPM[CPC]), ImportCubicPM[CPC] = "MP-MONTHLYPM-PM-"))
When I try to combine these 2 formulas, I receive an error "Operator or expression '()' is not supported in this context"
CPC = CALCULATE (Drive_Station[TotMP] - (COUNT(ImportCubicPM[CPC]), FILTER(ALL(ImportCubicPM[CPC]), ImportCubicPM[CPC] = "MP-MONTHLYPM-PM-"))
Hey,
here you can find my version of your pbix file
Your DAX statement for your calculated column just creates values for the filtered rows leaving the other rows empty. In the final calculation this leads to the error message because these empty cells are interpreted as an empty string. For this reason I rewrote this in the final DAX statement - the measure [CPC_COUNT_DELTA]
There is a second measure CPC_COUNT_CHECK this measure just counts, there is an issue for the "Current Month: 2017 April". My Measure counts 7 your Calculated column counts 9, please check.
I used the name CPC_COUNT to create a calculated column using the DAX you provided.
I do not want to be rude, but please be a little more precise the next you are asking for help
All this adds to some extra time trying to solve your issue
Here is really greast post by @Greg_Deckler what ideally should be contained in any question, but not all that is mentioned has to be provided, but please read this.
Regards
Tom
Thanks Tom.
When I add CPC_COUNT_DELTA to the "No MP PMs" card on the "Cubic PMs" tab and then select the month August, you can see that it is calculating properly. You can see in the table "Devices with No PMs" that there are 2 MPs in the list.
MP49999 and MP36301.
If you select the month of July the results show 0, but in the "Devices with no PMs" table you can see that there is 1 MP device.
MP49999
I see that you were doing your calculations from the ImportCubicPM table I was creating the column in the Drive_Station table. I use this table because it has a list of all of the devices, but the ImportCubicPM table only has devices where a PM was created for the month. There is also a card with a big, red number that shows "Total Devices No PMs" This is giving me the correct total of all devices in a month with no PMs.
What I am trying to get at is break down the devices by filtering MP devices, SAV devices, and TVM Devices.
I hope this makes sense.
Thanks, Mike
Hey,
please share a pbix with simplified data, by providing a link to the file on onedrive or dropbox.
Regards
Tom
I think that should be shared for you.
I did change the name from CPC to Monthly MP, but it is the same code
But you are trying to get the difference between a Column and a Measure?, is CPC a Column or a Measure?, if it's a Column, you should create a Measure to achive that.
Regards
CPC is a column, but Drive_Station[TotMP] is a measure.
User | Count |
---|---|
124 | |
108 | |
99 | |
62 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |