The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
On the dashboard page, we have year (2023) and month (Nov) filters, and the graph was changed as per the filters.
For example, on the x-axis, when we selected Nov, it showed 30th day instead of 31st and all previous months were restricted to 30th day in the graph. This means that 30th Nov, 30th Oct and 30th Sep
But when we selected Oct, It showed 31st day, and the graph will produce 31st Oct, 30th Sep, and 31st Aug.
Technically, it is correct, but i want to show 31st day in Nov on the x-axis and all monthsRe, and the graph values will show on 30th Nov, 31st Oct and 30th Sep. Are there any possibilities in DAX?
Solved! Go to Solution.
That requirement results in a lot of extra setup. Not sure this is maintainable. But here goes
Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Datasets:
Date | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Jan | 278 | 179 | 144 | 368 | 218 | 364 | 205 | 481 | 284 | 334 | 163 | 463 | 304 | 186 | 385 | 176 | 497 | 492 | 470 | 326 | 228 | 458 | 123 | 264 | 368 | 493 | 331 | 284 | 258 | 480 | 307 |
Feb | 343 | 178 | 294 | 428 | 268 | 350 | 221 | 186 | 199 | 293 | 359 | 144 | 200 | 400 | 406 | 463 | 387 | 227 | 468 | 176 | 261 | 333 | 182 | 379 | 266 | 490 | 175 | 177 | |||
Mar | 465 | 253 | 345 | 398 | 126 | 498 | 309 | 301 | 196 | 331 | 387 | 349 | 129 | 127 | 295 | 103 | 362 | 414 | 104 | 206 | 429 | 195 | 232 | 303 | 326 | 483 | 244 | 148 | 174 | 462 | 499 |
Apr | 166 | 156 | 494 | 106 | 210 | 382 | 120 | 485 | 101 | 326 | 440 | 341 | 194 | 255 | 290 | 325 | 363 | 391 | 216 | 152 | 214 | 447 | 121 | 176 | 229 | 308 | 405 | 212 | 498 | 397 | |
May | 369 | 208 | 406 | 446 | 197 | 251 | 255 | 183 | 103 | 316 | 164 | 430 | 499 | 405 | 231 | 306 | 448 | 138 | 463 | 394 | 333 | 186 | 303 | 260 | 378 | 228 | 499 | 431 | 224 | 413 | 324 |
Jun | 108 | 286 | 346 | 106 | 166 | 191 | 274 | 286 | 120 | 461 | 416 | 144 | 465 | 476 | 332 | 324 | 253 | 126 | 137 | 208 | 200 | 443 | 489 | 142 | 231 | 365 | 244 | 484 | 106 | 276 | |
Jul | 323 | 268 | 175 | 490 | 224 | 396 | 351 | 312 | 395 | 446 | 372 | 419 | 402 | 371 | 123 | 383 | 243 | 319 | 256 | 481 | 245 | 335 | 367 | 301 | 328 | 381 | 327 | 406 | 450 | 408 | 131 |
Aug | 230 | 319 | 425 | 437 | 142 | 213 | 427 | 349 | 350 | 426 | 429 | 179 | 433 | 209 | 432 | 456 | 298 | 114 | 137 | 189 | 259 | 485 | 406 | 179 | 414 | 250 | 262 | 391 | 495 | 482 | 135 |
Sep | 151 | 257 | 342 | 317 | 129 | 295 | 352 | 482 | 290 | 406 | 118 | 143 | 150 | 479 | 436 | 118 | 184 | 215 | 189 | 212 | 376 | 130 | 175 | 200 | 413 | 181 | 444 | 263 | 190 | 375 | |
Oct | 342 | 494 | 427 | 429 | 325 | 188 | 306 | 223 | 356 | 383 | 193 | 211 | 118 | 222 | 231 | 301 | 481 | 431 | 396 | 192 | 327 | 309 | 154 | 375 | 404 | 406 | 263 | 364 | 231 | 385 | 480 |
Nov | 106 | 142 | 310 | 193 | 175 | 311 | 220 | 253 | 374 | 486 | 209 | 389 | 240 | 236 | 356 | 130 | 155 | 160 | 392 | 310 | 497 | 332 | 246 | 349 | 171 | 345 | 469 | 240 | 286 | 403 |
Measure:
'Mbal = calculate([TBal], LASTNONBLANK('Calendar'[Date],[TBal]))
Oct Formula = calculate([MBal], DATEADD('Calendar'[Date],-1,MONTH))
'Sep formula= calculate([MBal], DATEADD('Calendar'[Date],-2,MONTH))
Showing Display:
Should be Display:
User | Count |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |